mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-08-23 01:27:13 +02:00
cmd/cli: implement valid interfaces map for all systems
Previously, a valid interfaces map is only meaningful on Windows and Darwin, where ctrld needs to set DNS for all physical interfaces. With new network monitor, the valid interfaces is used for checking new changes, thus we have to implement the valid interfaces map for all systems. - On Linux, just retrieving all non-virtual interfaces. - On others, fallback to use default route interface only.
This commit is contained in:
@@ -1366,7 +1366,7 @@ func (p *prog) monitorNetworkChanges(ctx context.Context) error {
|
||||
|
||||
changed := false
|
||||
activeInterfaceExists := false
|
||||
changeIPs := []netip.Prefix{}
|
||||
var changeIPs []netip.Prefix
|
||||
// Check each valid interface for changes
|
||||
for ifaceName := range validIfaces {
|
||||
oldIface := delta.Old.Interface[ifaceName]
|
||||
|
||||
Reference in New Issue
Block a user