]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Static: Fix reset neighbor entries for ECMP routes
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Tue, 4 Dec 2018 12:52:58 +0000 (13:52 +0100)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Tue, 4 Dec 2018 12:52:58 +0000 (13:52 +0100)
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

index 849067b91ad4c4f8a1985f12caf11e207f25fd46..6ddff146340e03c9d54cdc0b1859bbb6f1d1cef4 100644 (file)
@@ -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;