summaryrefslogtreecommitdiff
path: root/proto/rip
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2016-11-08 17:03:31 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2016-11-08 17:04:29 +0100
commitcc5b93f72db80abd1262a0a5e1d8400ceef54385 (patch)
tree42d75cb7898c6b6077e9cfbb04074cfc84e38930 /proto/rip
parent5de0e848de06a9187046dbc380d9ce6a6f8b21a2 (diff)
parentf51b1f556595108d53b9f4580bfcb96bfbc85442 (diff)
Merge tag 'v1.6.2' into int-new
Diffstat (limited to 'proto/rip')
-rw-r--r--proto/rip/rip.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/proto/rip/rip.c b/proto/rip/rip.c
index 131c09ce..74d472c9 100644
--- a/proto/rip/rip.c
+++ b/proto/rip/rip.c
@@ -162,7 +162,6 @@ rip_announce_rte(struct rip_proto *p, struct rip_entry *en)
{
/* ECMP route */
struct mpnh *nhs = NULL;
- struct mpnh **nhp = &nhs;
int num = 0;
for (rt = en->routes; rt && (num < p->ecmp); rt = rt->next)
@@ -174,9 +173,7 @@ rip_announce_rte(struct rip_proto *p, struct rip_entry *en)
nh->gw = rt->next_hop;
nh->iface = rt->from->nbr->iface;
nh->weight = rt->from->ifa->cf->ecmp_weight;
- nh->next = NULL;
- *nhp = nh;
- nhp = &(nh->next);
+ mpnh_insert(&nhs, nh);
num++;
if (rt->tag != rt_tag)