From ea59172cdec564af781181c9c3e388c59178b49e Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Tue, 4 Dec 2018 13:52:58 +0100 Subject: [PATCH] Static: Fix reset neighbor entries for ECMP routes Neighbor entries for static ECMP routes were not cleaned up during reconfigure and pointed to the old instances, which leads to crash after reconfigure. Thanks to Vladimir Osmolovskiy for the bugreport. --- proto/static/static.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/proto/static/static.c b/proto/static/static.c index 849067b91..6ddff1463 100644 --- a/proto/static/static.c +++ b/proto/static/static.c @@ -518,6 +518,11 @@ static_match(struct proto *p, struct static_route *r, struct static_config *n) if (r->neigh) r->neigh->data = NULL; + if (r->dest == RTD_MULTIPATH) + for (t = r->mp_next; t; t = t->mp_next) + if (t->neigh) + t->neigh->data = NULL; + WALK_LIST(t, n->iface_routes) if (static_same_net(r, t)) goto found; -- 2.39.2