cmd/cli: only list physical interfaces when listing

Since these are the interfaces that ctrld will manipulate anyway.

While at it, also skipping non-working devices on MacOS, by checking
if the device is present in network service order
This commit is contained in:
Cuong Manh Le
2025-01-16 14:00:34 +07:00
committed by Cuong Manh Le
parent 7833132917
commit 841be069b7
6 changed files with 24 additions and 16 deletions
+1 -1
View File
@@ -764,7 +764,7 @@ func netInterface(ifaceName string) (*net.Interface, error) {
if iface == nil {
return nil, errors.New("interface not found")
}
if err := patchNetIfaceName(iface); err != nil {
if _, err := patchNetIfaceName(iface); err != nil {
return nil, err
}
return iface, err