mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-07-04 01:07:49 +02:00
internal: only delete old ipv6 if it is non-link local
So the client is removed from table only when it's global ipv6 changed.
This commit is contained in:
committed by
Cuong Manh Le
parent
affef963c1
commit
b002dff624
@@ -24,7 +24,7 @@ func (nd *ndpDiscover) scan() {
|
||||
}
|
||||
ip := n.IP.String()
|
||||
mac := n.HardwareAddr.String()
|
||||
nd.saveInfo(ip, mac, false)
|
||||
nd.saveInfo(ip, mac)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ func (nd *ndpDiscover) subscribe(ctx context.Context) {
|
||||
mac := nu.HardwareAddr.String()
|
||||
switch nu.State {
|
||||
case netlink.NUD_REACHABLE:
|
||||
nd.saveInfo(ip, mac, false)
|
||||
nd.saveInfo(ip, mac)
|
||||
case netlink.NUD_FAILED:
|
||||
ctrld.ProxyLogger.Load().Debug().Msgf("removing NDP neighbor with failed state: %s", ip)
|
||||
nd.mac.Delete(ip)
|
||||
|
||||
Reference in New Issue
Block a user