summaryrefslogtreecommitdiff
path: root/vrrpd/vrrp.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2021-10-22 01:17:40 +0300
committerIgor Ryzhov <iryzhov@nfware.com>2021-11-22 20:47:23 +0300
commit096f7609f9168ad1a2503acad31d3afc8f00f9e5 (patch)
tree7acf9cbf0f944b032da6a796fcf8d7f6a06fe90a /vrrpd/vrrp.c
parentd32c92a4c0fcee71a8a6d02cb9ff84607cfdcc07 (diff)
*: 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 'vrrpd/vrrp.c')
-rw-r--r--vrrpd/vrrp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/vrrpd/vrrp.c b/vrrpd/vrrp.c
index 775611b3e3..4e2c12c4e0 100644
--- a/vrrpd/vrrp.c
+++ b/vrrpd/vrrp.c
@@ -216,7 +216,7 @@ static struct vrrp_vrouter *vrrp_lookup_by_if_mvl(struct interface *mvl_ifp)
return NULL;
}
- p = if_lookup_by_index(mvl_ifp->link_ifindex, mvl_ifp->vrf_id);
+ p = if_lookup_by_index(mvl_ifp->link_ifindex, mvl_ifp->vrf->vrf_id);
if (!p) {
DEBUGD(&vrrp_dbg_zebra,
@@ -544,7 +544,7 @@ static bool vrrp_attach_interface(struct vrrp_router *r)
size_t ifps_cnt =
if_lookup_by_hwaddr(r->vmac.octet, sizeof(r->vmac.octet), &ifps,
- r->vr->ifp->vrf_id);
+ r->vr->ifp->vrf->vrf_id);
/*
* Filter to only those macvlan interfaces whose parent is the base
@@ -1083,9 +1083,9 @@ static int vrrp_socket(struct vrrp_router *r)
frr_with_privs(&vrrp_privs) {
r->sock_rx = vrf_socket(r->family, SOCK_RAW, IPPROTO_VRRP,
- r->vr->ifp->vrf_id, NULL);
+ r->vr->ifp->vrf->vrf_id, NULL);
r->sock_tx = vrf_socket(r->family, SOCK_RAW, IPPROTO_VRRP,
- r->vr->ifp->vrf_id, NULL);
+ r->vr->ifp->vrf->vrf_id, NULL);
}
if (r->sock_rx < 0 || r->sock_tx < 0) {
@@ -1102,7 +1102,7 @@ static int vrrp_socket(struct vrrp_router *r)
* Bind Tx socket to macvlan device - necessary for VRF support,
* otherwise the kernel will select the vrf device
*/
- if (r->vr->ifp->vrf_id != VRF_DEFAULT) {
+ if (r->vr->ifp->vrf->vrf_id != VRF_DEFAULT) {
frr_with_privs (&vrrp_privs) {
ret = setsockopt(r->sock_tx, SOL_SOCKET,
SO_BINDTODEVICE, r->mvl_ifp->name,
@@ -1751,7 +1751,7 @@ vrrp_autoconfig_autocreate(struct interface *mvl_ifp)
struct interface *p;
struct vrrp_vrouter *vr;
- p = if_lookup_by_index(mvl_ifp->link_ifindex, mvl_ifp->vrf_id);
+ p = if_lookup_by_index(mvl_ifp->link_ifindex, mvl_ifp->vrf->vrf_id);
if (!p)
return NULL;