mirror of
https://github.com/slackhq/nebula.git
synced 2025-11-22 00:15:37 +01:00
netlink: ignore route updates with no destination (#1437)
Currently we assume each route update must have a destination, but we should check that it is set before we try to use it. See: #1436
This commit is contained in:
@@ -638,6 +638,11 @@ func (t *tun) updateRoutes(r netlink.RouteUpdate) {
|
||||
return
|
||||
}
|
||||
|
||||
if r.Dst == nil {
|
||||
t.l.WithField("route", r).Debug("Ignoring route update, no destination address")
|
||||
return
|
||||
}
|
||||
|
||||
dstAddr, ok := netip.AddrFromSlice(r.Dst.IP)
|
||||
if !ok {
|
||||
t.l.WithField("route", r).Debug("Ignoring route update, invalid destination address")
|
||||
|
||||
Reference in New Issue
Block a user