fix(wgcontroller): avoid nil deref in RemoveRoutes when the link is already gone (#786)
Docker / Build and Push (push) Canceled after 0s
github-pages / deploy (push) Canceled after 0s
Test / make test (push) Canceled after 0s
Docker / release (push) Canceled after 0s

This commit is contained in:
ndiruhniu
2026-12-03 18:57:15 +01:00
committed by GitHub
parent 8ec46497f0
commit cc32c8af83
+1 -1
View File
@@ -796,7 +796,7 @@ func (c LocalController) getOrCreateRoutingTableAndFwMark(
table = tableIn table = tableIn
fwmark = fwMarkIn fwmark = fwMarkIn
if fwmark == 0 { if fwmark == 0 && link != nil {
// generate a new (temporary) firewall mark based on the interface index // generate a new (temporary) firewall mark based on the interface index
fwmark = uint32(c.cfg.Advanced.RouteTableOffset + link.Attrs().Index) fwmark = uint32(c.cfg.Advanced.RouteTableOffset + link.Attrs().Index)
} }