diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2021-10-21 15:16:21 +0200 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2022-03-27 14:51:00 +0200 |
| commit | e9ac2861e521c2b35ffa1319a6d38fb3453e83a4 (patch) | |
| tree | f67eb79635d5e4e5805adc27d1df6c93996a4975 | |
| parent | bc9b1cbfae30d2b06198ee6d26a12a541f7e79a9 (diff) | |
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>
| -rw-r--r-- | zebra/zapi_msg.c | 2 | ||||
| -rw-r--r-- | zebra/zebra_rnh.c | 6 | ||||
| -rw-r--r-- | zebra/zebra_rnh.h | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c index e94aee5c1a..fd475e4cee 100644 --- a/zebra/zapi_msg.c +++ b/zebra/zapi_msg.c @@ -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; diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c index f3f48b52ae..9a2b81bc27 100644 --- a/zebra/zebra_rnh.c +++ b/zebra/zebra_rnh.c @@ -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; diff --git a/zebra/zebra_rnh.h b/zebra/zebra_rnh.h index 27c016ebe6..c8e7dda437 100644 --- a/zebra/zebra_rnh.h +++ b/zebra/zebra_rnh.h @@ -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); |
