struct mpnh **n = &root;
int count = p->ecmp;
+ ASSERT(p->ecmp);
+
/*
* r1, r2 signalize whether we can reuse nexthops from s1, s2.
* New nexthops (s2, new) can be reused if they are not inherited
struct mpnh **nn1 = &root1;
struct mpnh **nn2 = &root2;
+ if (!p->ecmp)
+ return new_nexthop(p, gw, n->iface, n->weight);
+
/* This is a bit tricky. We cannot just copy the list and update n->gw,
because the list should stay sorted, so we create two lists, one with new
gateways and one with old ones, and then merge them. */