summaryrefslogtreecommitdiff
path: root/zebra/zebra_rib.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2017-09-05 08:06:23 -0300
committerRenato Westphal <renato@opensourcerouting.org>2017-09-21 13:27:50 -0300
commit7990990e54f2145b5d2527cb4af00de9d77ba10c (patch)
tree1fb629cb1b8d5ad3049de338d77c86bdde0c8ddd /zebra/zebra_rib.c
parentb1cebe20cd1b5663cc2a47a99ac94dac046b8610 (diff)
zebra: use the afi parameter in rib_add_multipath()
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'zebra/zebra_rib.c')
-rw-r--r--zebra/zebra_rib.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index bb49663319..7c140598c2 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -2216,20 +2216,14 @@ int rib_add_multipath(afi_t afi, safi_t safi, struct prefix *p,
struct route_entry *same;
struct nexthop *nexthop;
int ret = 0;
- int family;
if (!re)
return 0;
- if (p->family == AF_INET)
- family = AFI_IP;
- else
- family = AFI_IP6;
-
- assert(!src_p || family == AFI_IP6);
+ assert(!src_p || afi == AFI_IP6);
/* Lookup table. */
- table = zebra_vrf_table_with_table_id(family, safi, re->vrf_id,
+ table = zebra_vrf_table_with_table_id(afi, safi, re->vrf_id,
re->table);
if (!table)
return 0;