summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2018-12-04 13:52:58 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2018-12-04 13:52:58 +0100
commitea59172cdec564af781181c9c3e388c59178b49e (patch)
tree2692ab67b092e805db068e835257f748becd035b
parent93cec703616f459ba0cdfe3f808dd85e76b1339d (diff)
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.
-rw-r--r--proto/static/static.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/proto/static/static.c b/proto/static/static.c
index 849067b9..6ddff146 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;