From: Ondrej Zajicek (work) Date: Tue, 4 Dec 2018 12:52:58 +0000 (+0100) Subject: Static: Fix reset neighbor entries for ECMP routes X-Git-Tag: v1.6.5~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea59172cdec564af781181c9c3e388c59178b49e;p=thirdparty%2Fbird.git 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. --- 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;