mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-29 20:56:50 +00:00
zebra: use the afi parameter in rib_add_multipath()
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
This commit is contained in:
parent
b1cebe20cd
commit
7990990e54
@ -526,7 +526,7 @@ static int netlink_route_change_read_unicast(struct sockaddr_nl *snl,
|
|||||||
if (re->nexthop_num == 0)
|
if (re->nexthop_num == 0)
|
||||||
XFREE(MTYPE_RE, re);
|
XFREE(MTYPE_RE, re);
|
||||||
else
|
else
|
||||||
rib_add_multipath(AFI_IP, SAFI_UNICAST, &p,
|
rib_add_multipath(afi, SAFI_UNICAST, &p,
|
||||||
NULL, re);
|
NULL, re);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -2216,20 +2216,14 @@ int rib_add_multipath(afi_t afi, safi_t safi, struct prefix *p,
|
|||||||
struct route_entry *same;
|
struct route_entry *same;
|
||||||
struct nexthop *nexthop;
|
struct nexthop *nexthop;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
int family;
|
|
||||||
|
|
||||||
if (!re)
|
if (!re)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (p->family == AF_INET)
|
assert(!src_p || afi == AFI_IP6);
|
||||||
family = AFI_IP;
|
|
||||||
else
|
|
||||||
family = AFI_IP6;
|
|
||||||
|
|
||||||
assert(!src_p || family == AFI_IP6);
|
|
||||||
|
|
||||||
/* Lookup table. */
|
/* 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);
|
re->table);
|
||||||
if (!table)
|
if (!table)
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user