diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2016-08-30 17:17:27 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2016-09-14 11:53:54 +0200 |
commit | 84cac51a51fc29349077e8cecadf1aed11f9b824 (patch) | |
tree | 68186ea208019211d06ad98df82df84ab255f5e6 /proto/rip | |
parent | a1839f3c61af66814a8c52b9ad28e59aab4ede0e (diff) |
Nest: Keep multipath next hops sorted
Diffstat (limited to 'proto/rip')
-rw-r--r-- | proto/rip/rip.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/proto/rip/rip.c b/proto/rip/rip.c index c85fd69b..36527253 100644 --- a/proto/rip/rip.c +++ b/proto/rip/rip.c @@ -173,7 +173,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) @@ -185,9 +184,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) |