mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 08:32:45 +00:00
zebra: Add the afi_t to the rnh
Store the associated afi with the rnh, it will be useful in the future. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
cead8cef16
commit
87554d831f
@ -101,12 +101,13 @@ struct rnh *zebra_add_rnh(struct prefix *p, vrf_id_t vrfid, rnh_type_t type,
|
||||
struct route_node *rn;
|
||||
struct rnh *rnh = NULL;
|
||||
char buf[PREFIX2STR_BUFFER];
|
||||
afi_t afi = family2afi(p->family);
|
||||
|
||||
if (IS_ZEBRA_DEBUG_NHT) {
|
||||
prefix2str(p, buf, sizeof(buf));
|
||||
zlog_debug("%u: Add RNH %s type %d", vrfid, buf, type);
|
||||
}
|
||||
table = get_rnh_table(vrfid, family2afi(PREFIX_FAMILY(p)), type);
|
||||
table = get_rnh_table(vrfid, afi, type);
|
||||
if (!table) {
|
||||
prefix2str(p, buf, sizeof(buf));
|
||||
flog_warn(EC_ZEBRA_RNH_NO_TABLE,
|
||||
@ -127,6 +128,7 @@ struct rnh *zebra_add_rnh(struct prefix *p, vrf_id_t vrfid, rnh_type_t type,
|
||||
rnh->client_list = list_new();
|
||||
rnh->vrf_id = vrfid;
|
||||
rnh->type = type;
|
||||
rnh->afi = afi;
|
||||
rnh->zebra_pseudowire_list = list_new();
|
||||
route_lock_node(rn);
|
||||
rn->info = rnh;
|
||||
|
@ -42,6 +42,8 @@ struct rnh {
|
||||
/* VRF identifier. */
|
||||
vrf_id_t vrf_id;
|
||||
|
||||
afi_t afi;
|
||||
|
||||
rnh_type_t type;
|
||||
|
||||
struct route_entry *state;
|
||||
|
Loading…
Reference in New Issue
Block a user