From cc2722424ef55918f6feee45958eedf0b3eddd51 Mon Sep 17 00:00:00 2001 From: Wade Simmons Date: Thu, 24 Jul 2025 16:23:36 -0400 Subject: [PATCH] netlink: ignore route updates with no destination 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 --- overlay/tun_linux.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/overlay/tun_linux.go b/overlay/tun_linux.go index 4c509ba..00e3284 100644 --- a/overlay/tun_linux.go +++ b/overlay/tun_linux.go @@ -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")