mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 02:46:37 +00:00
zebra: register NHT nexthops with proper SAFI
Just a small puzzle piece missing in zebra SAFI NHT support. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
bc9b1cbfae
commit
e9ac2861e5
@ -1215,7 +1215,7 @@ static void zread_rnh_register(ZAPI_HANDLER_ARGS)
|
||||
p.family);
|
||||
return;
|
||||
}
|
||||
rnh = zebra_add_rnh(&p, zvrf_id(zvrf), &exist);
|
||||
rnh = zebra_add_rnh(&p, zvrf_id(zvrf), safi, &exist);
|
||||
if (!rnh)
|
||||
return;
|
||||
|
||||
|
@ -132,13 +132,13 @@ static void zebra_rnh_store_in_routing_table(struct rnh *rnh)
|
||||
route_unlock_node(rn);
|
||||
}
|
||||
|
||||
struct rnh *zebra_add_rnh(struct prefix *p, vrf_id_t vrfid, bool *exists)
|
||||
struct rnh *zebra_add_rnh(struct prefix *p, vrf_id_t vrfid, safi_t safi,
|
||||
bool *exists)
|
||||
{
|
||||
struct route_table *table;
|
||||
struct route_node *rn;
|
||||
struct rnh *rnh = NULL;
|
||||
afi_t afi = family2afi(p->family);
|
||||
safi_t safi = SAFI_UNICAST;
|
||||
|
||||
if (IS_ZEBRA_DEBUG_NHT) {
|
||||
struct vrf *vrf = vrf_lookup_by_id(vrfid);
|
||||
@ -345,7 +345,7 @@ void zebra_register_rnh_pseudowire(vrf_id_t vrf_id, struct zebra_pw *pw,
|
||||
return;
|
||||
|
||||
addr2hostprefix(pw->af, &pw->nexthop, &nh);
|
||||
rnh = zebra_add_rnh(&nh, vrf_id, &exists);
|
||||
rnh = zebra_add_rnh(&nh, vrf_id, SAFI_UNICAST, &exists);
|
||||
if (!rnh)
|
||||
return;
|
||||
|
||||
|
@ -31,7 +31,7 @@ extern "C" {
|
||||
|
||||
extern void zebra_rnh_init(void);
|
||||
|
||||
extern struct rnh *zebra_add_rnh(struct prefix *p, vrf_id_t vrfid,
|
||||
extern struct rnh *zebra_add_rnh(struct prefix *p, vrf_id_t vrfid, safi_t safi,
|
||||
bool *exists);
|
||||
extern struct rnh *zebra_lookup_rnh(struct prefix *p, vrf_id_t vrfid,
|
||||
safi_t safi);
|
||||
|
Loading…
Reference in New Issue
Block a user