mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-17 20:09:38 +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 route_node *rn;
|
||||||
struct rnh *rnh = NULL;
|
struct rnh *rnh = NULL;
|
||||||
char buf[PREFIX2STR_BUFFER];
|
char buf[PREFIX2STR_BUFFER];
|
||||||
|
afi_t afi = family2afi(p->family);
|
||||||
|
|
||||||
if (IS_ZEBRA_DEBUG_NHT) {
|
if (IS_ZEBRA_DEBUG_NHT) {
|
||||||
prefix2str(p, buf, sizeof(buf));
|
prefix2str(p, buf, sizeof(buf));
|
||||||
zlog_debug("%u: Add RNH %s type %d", vrfid, buf, type);
|
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) {
|
if (!table) {
|
||||||
prefix2str(p, buf, sizeof(buf));
|
prefix2str(p, buf, sizeof(buf));
|
||||||
flog_warn(EC_ZEBRA_RNH_NO_TABLE,
|
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->client_list = list_new();
|
||||||
rnh->vrf_id = vrfid;
|
rnh->vrf_id = vrfid;
|
||||||
rnh->type = type;
|
rnh->type = type;
|
||||||
|
rnh->afi = afi;
|
||||||
rnh->zebra_pseudowire_list = list_new();
|
rnh->zebra_pseudowire_list = list_new();
|
||||||
route_lock_node(rn);
|
route_lock_node(rn);
|
||||||
rn->info = rnh;
|
rn->info = rnh;
|
||||||
|
@ -42,6 +42,8 @@ struct rnh {
|
|||||||
/* VRF identifier. */
|
/* VRF identifier. */
|
||||||
vrf_id_t vrf_id;
|
vrf_id_t vrf_id;
|
||||||
|
|
||||||
|
afi_t afi;
|
||||||
|
|
||||||
rnh_type_t type;
|
rnh_type_t type;
|
||||||
|
|
||||||
struct route_entry *state;
|
struct route_entry *state;
|
||||||
|
Loading…
Reference in New Issue
Block a user