mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-07-04 01:07:49 +02:00
cmd/cli: extend list of valid interfaces for MacOS
By parsing "networksetup -listallhardwareports" output to get list of available hardware ports.
This commit is contained in:
committed by
Cuong Manh Le
parent
82e0d4b0c4
commit
5f4a399850
@@ -10,7 +10,7 @@ func patchNetIfaceName(iface *net.Interface) error {
|
||||
|
||||
// validInterface reports whether the *net.Interface is a valid one.
|
||||
// On Windows, only physical interfaces are considered valid.
|
||||
func validInterface(iface *net.Interface) bool {
|
||||
func validInterface(iface *net.Interface, validIfacesMap map[string]struct{}) bool {
|
||||
if iface == nil {
|
||||
return false
|
||||
}
|
||||
@@ -19,3 +19,5 @@ func validInterface(iface *net.Interface) bool {
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func validInterfacesMap() map[string]struct{} { return nil }
|
||||
|
||||
Reference in New Issue
Block a user