summaryrefslogtreecommitdiffstats
path: root/isisd
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2021-10-22 00:17:40 +0200
committerIgor Ryzhov <iryzhov@nfware.com>2021-11-22 18:47:23 +0100
commit096f7609f9168ad1a2503acad31d3afc8f00f9e5 (patch)
tree7acf9cbf0f944b032da6a796fcf8d7f6a06fe90a /isisd
parentMerge pull request #10057 from ton31337/fix/we_shouldn_send_LLA_for_RS (diff)
downloadfrr-096f7609f9168ad1a2503acad31d3afc8f00f9e5.tar.xz
frr-096f7609f9168ad1a2503acad31d3afc8f00f9e5.zip
*: cleanup ifp->vrf_id
Since f60a1188 we store a pointer to the VRF in the interface structure. There's no need anymore to store a separate vrf_id field. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'isisd')
-rw-r--r--isisd/isis_bfd.c3
-rw-r--r--isisd/isis_circuit.c2
-rw-r--r--isisd/isis_ldp_sync.c2
-rw-r--r--isisd/isis_nb_config.c2
-rw-r--r--isisd/isis_pfpacket.c11
5 files changed, 8 insertions, 12 deletions
diff --git a/isisd/isis_bfd.c b/isisd/isis_bfd.c
index 7510e310f..a7548e2f1 100644
--- a/isisd/isis_bfd.c
+++ b/isisd/isis_bfd.c
@@ -132,7 +132,8 @@ static void bfd_handle_adj_up(struct isis_adjacency *adj)
bfd_sess_set_ipv6_addrs(adj->bfd_session, &src_ip.ipv6,
&dst_ip.ipv6);
bfd_sess_set_interface(adj->bfd_session, adj->circuit->interface->name);
- bfd_sess_set_vrf(adj->bfd_session, adj->circuit->interface->vrf_id);
+ bfd_sess_set_vrf(adj->bfd_session,
+ adj->circuit->interface->vrf->vrf_id);
bfd_sess_set_profile(adj->bfd_session, circuit->bfd_config.profile);
bfd_sess_install(adj->bfd_session);
return;
diff --git a/isisd/isis_circuit.c b/isisd/isis_circuit.c
index 2fe89db2b..a91bbd0b9 100644
--- a/isisd/isis_circuit.c
+++ b/isisd/isis_circuit.c
@@ -82,7 +82,7 @@ static void isis_circuit_enable(struct isis_circuit *circuit)
struct interface *ifp = circuit->interface;
if (!area) {
- area = isis_area_lookup(circuit->tag, ifp->vrf_id);
+ area = isis_area_lookup(circuit->tag, ifp->vrf->vrf_id);
if (area)
isis_area_add_circuit(area, circuit);
}
diff --git a/isisd/isis_ldp_sync.c b/isisd/isis_ldp_sync.c
index 9d494121c..0c541348d 100644
--- a/isisd/isis_ldp_sync.c
+++ b/isisd/isis_ldp_sync.c
@@ -218,7 +218,7 @@ static int isis_ldp_sync_adj_state_change(struct isis_adjacency *adj)
struct isis_area *area = circuit->area;
if (!CHECK_FLAG(area->ldp_sync_cmd.flags, LDP_SYNC_FLAG_ENABLE)
- || circuit->interface->vrf_id != VRF_DEFAULT
+ || circuit->interface->vrf->vrf_id != VRF_DEFAULT
|| if_is_loopback(circuit->interface))
return 0;
diff --git a/isisd/isis_nb_config.c b/isisd/isis_nb_config.c
index 07af46c04..3674d6937 100644
--- a/isisd/isis_nb_config.c
+++ b/isisd/isis_nb_config.c
@@ -2479,7 +2479,7 @@ int lib_interface_isis_create(struct nb_cb_create_args *args)
actual_mtu =
if_is_broadcast(ifp) ? ifp->mtu - LLC_LEN : ifp->mtu;
- area = isis_area_lookup(area_tag, ifp->vrf_id);
+ area = isis_area_lookup(area_tag, ifp->vrf->vrf_id);
if (area)
min_mtu = area->lsp_mtu;
else
diff --git a/isisd/isis_pfpacket.c b/isisd/isis_pfpacket.c
index 4a884877f..20224c73a 100644
--- a/isisd/isis_pfpacket.c
+++ b/isisd/isis_pfpacket.c
@@ -123,15 +123,10 @@ static int open_packet_socket(struct isis_circuit *circuit)
int fd, retval = ISIS_OK;
struct vrf *vrf = NULL;
- vrf = vrf_lookup_by_id(circuit->interface->vrf_id);
+ vrf = circuit->interface->vrf;
- if (vrf == NULL) {
- zlog_warn("open_packet_socket(): failed to find vrf node");
- return ISIS_WARNING;
- }
-
- fd = vrf_socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_ALL),
- circuit->interface->vrf_id, vrf->name);
+ fd = vrf_socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_ALL), vrf->vrf_id,
+ vrf->name);
if (fd < 0) {
zlog_warn("open_packet_socket(): socket() failed %s",