platform: Uniq network interfaces
This commit is contained in:
parent
8d88c6532f
commit
e0f1cdf464
1 changed files with 3 additions and 0 deletions
|
|
@ -126,6 +126,9 @@ func (w *platformInterfaceWrapper) NetworkInterfaces() ([]adapter.NetworkInterfa
|
|||
Constrained: isDefault && w.isConstrained,
|
||||
})
|
||||
}
|
||||
interfaces = common.UniqBy(interfaces, func(it adapter.NetworkInterface) string {
|
||||
return it.Name
|
||||
})
|
||||
return interfaces, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue