Skip to content

Commit 5cff83b

Browse files
authored
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
1 parent 7da7968 commit 5cff83b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

overlay/tun_linux.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,11 @@ func (t *tun) updateRoutes(r netlink.RouteUpdate) {
638638
return
639639
}
640640

641+
if r.Dst == nil {
642+
t.l.WithField("route", r).Debug("Ignoring route update, no destination address")
643+
return
644+
}
645+
641646
dstAddr, ok := netip.AddrFromSlice(r.Dst.IP)
642647
if !ok {
643648
t.l.WithField("route", r).Debug("Ignoring route update, invalid destination address")

0 commit comments

Comments
 (0)