mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-10-12 01:58:46 +02:00
refactor(network): consolidate network change monitoring
Remove separate watchLinkState function and integrate link state change handling directly into monitorNetworkChanges. This consolidates network monitoring logic into a single place and simplifies the codebase. Update netlink dependency from v1.2.1-beta.2 to v1.3.1 and netns from v0.0.4 to v0.0.5 to use stable versions.
This commit is contained in:
1 parent
1804e6db67
commit
f05519d1c8
3 files changed
+13
-9
No files matched your search
@@ -1280,6 +1280,11 @@ func (p *prog) monitorNetworkChanges() error {
|
||||
return
|
||||
}
|
||||
|
||||
mainLog.Load().Debug().Msg("Link state changed, re-bootstrapping")
|
||||
for _, uc := range p.cfg.Upstream {
|
||||
uc.ReBootstrap()
|
||||
}
|
||||
|
||||
// Get IPs from default route interface in new state
|
||||
selfIP := defaultRouteIP()
|
||||
|
||||
|
||||
Reference in new issue
Block a user