diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2021-09-24 16:42:25 -0400 | 
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2021-09-27 12:38:08 -0400 | 
| commit | a4598b97d93937eead669d406afa91fd070de83b (patch) | |
| tree | 478ebb46518d43ea1bb5f6fdd0f4dd645e712758 /zebra/zebra_rnh.c | |
| parent | d597533a9dcabc298a53112c22e94c0264cd3f39 (diff) | |
zebra: Create the SAFI_MULTICAST rnh tables
Actually create the SAFI_MULTICAST rnh tables.  No code
uses these yet.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/zebra_rnh.c')
| -rw-r--r-- | zebra/zebra_rnh.c | 10 | 
1 files changed, 6 insertions, 4 deletions
diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c index e782839d17..1d33d5f4a4 100644 --- a/zebra/zebra_rnh.c +++ b/zebra/zebra_rnh.c @@ -80,6 +80,8 @@ static inline struct route_table *get_rnh_table(vrf_id_t vrfid, afi_t afi,  	if (zvrf) {  		if (safi == SAFI_UNICAST)  			t = zvrf->rnh_table[afi]; +		else if (safi == SAFI_MULTICAST) +			t = zvrf->rnh_table_multicast[afi];  	}  	return t; @@ -88,7 +90,7 @@ static inline struct route_table *get_rnh_table(vrf_id_t vrfid, afi_t afi,  static void zebra_rnh_remove_from_routing_table(struct rnh *rnh)  {  	struct zebra_vrf *zvrf = zebra_vrf_lookup_by_id(rnh->vrf_id); -	struct route_table *table = zvrf->table[rnh->afi][SAFI_UNICAST]; +	struct route_table *table = zvrf->table[rnh->afi][rnh->safi];  	struct route_node *rn;  	rib_dest_t *dest; @@ -112,7 +114,7 @@ static void zebra_rnh_remove_from_routing_table(struct rnh *rnh)  static void zebra_rnh_store_in_routing_table(struct rnh *rnh)  {  	struct zebra_vrf *zvrf = zebra_vrf_lookup_by_id(rnh->vrf_id); -	struct route_table *table = zvrf->table[rnh->afi][SAFI_UNICAST]; +	struct route_table *table = zvrf->table[rnh->afi][rnh->safi];  	struct route_node *rn;  	rib_dest_t *dest; @@ -223,7 +225,7 @@ void zebra_free_rnh(struct rnh *rnh)  	list_delete(&rnh->zebra_pseudowire_list);  	zvrf = zebra_vrf_lookup_by_id(rnh->vrf_id); -	table = zvrf->table[family2afi(rnh->resolved_route.family)][SAFI_UNICAST]; +	table = zvrf->table[family2afi(rnh->resolved_route.family)][rnh->safi];  	if (table) {  		struct route_node *rern; @@ -563,7 +565,7 @@ zebra_rnh_resolve_nexthop_entry(struct zebra_vrf *zvrf, afi_t afi,  	*prn = NULL; -	route_table = zvrf->table[afi][SAFI_UNICAST]; +	route_table = zvrf->table[afi][rnh->safi];  	if (!route_table)  		return NULL;  | 
