Commit ea59172c authored by Ondrej Zajicek (work)'s avatar Ondrej Zajicek (work)
Browse files

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.
parent 93cec703
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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;