summaryrefslogtreecommitdiff
path: root/proto
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2021-11-15 10:53:58 +0100
committerMaria Matejka <mq@ucw.cz>2023-01-25 13:33:31 +0100
commit4334f86251429eb39bfe81ff19496d141fccef84 (patch)
tree2dce6e1833748b9b165ece7776afbcbb3fc7ddc3 /proto
parent72230d3ca37d34cafa0442c23f83121ae1fc41be (diff)
VRF setting reduced to one argument, using default dummy iface for default vrf
Diffstat (limited to 'proto')
-rw-r--r--proto/babel/babel.c2
-rw-r--r--proto/bfd/bfd.c2
-rw-r--r--proto/bgp/packets.c4
-rw-r--r--proto/ospf/iface.c4
-rw-r--r--proto/radv/radv.c2
-rw-r--r--proto/rip/rip.c2
6 files changed, 8 insertions, 8 deletions
diff --git a/proto/babel/babel.c b/proto/babel/babel.c
index ff8b6b52..ad7981f6 100644
--- a/proto/babel/babel.c
+++ b/proto/babel/babel.c
@@ -1946,7 +1946,7 @@ babel_reconfigure_ifaces(struct babel_proto *p, struct babel_config *cf)
WALK_LIST(iface, iface_list)
{
- if (p->p.vrf_set && p->p.vrf != iface->master)
+ if (p->p.vrf && p->p.vrf != iface->master)
continue;
if (!(iface->flags & IF_UP))
diff --git a/proto/bfd/bfd.c b/proto/bfd/bfd.c
index 873e2ed5..69e42f3d 100644
--- a/proto/bfd/bfd.c
+++ b/proto/bfd/bfd.c
@@ -659,7 +659,7 @@ bfd_add_request(struct bfd_proto *p, struct bfd_request *req)
{
struct bfd_config *cf = (struct bfd_config *) (p->p.cf);
- if (p->p.vrf_set && (p->p.vrf != req->vrf))
+ if (p->p.vrf && (p->p.vrf != req->vrf))
return 0;
if (ipa_is_ip4(req->addr) ? !cf->accept_ipv4 : !cf->accept_ipv6)
diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c
index 16818cf3..6244b62f 100644
--- a/proto/bgp/packets.c
+++ b/proto/bgp/packets.c
@@ -1130,7 +1130,7 @@ bgp_use_next_hop(struct bgp_export_state *s, eattr *a)
return 0;
/* Do not pass NEXT_HOP between different VRFs */
- if (p->p.vrf_set && s->src && s->src->p.vrf_set && (p->p.vrf != s->src->p.vrf))
+ if (p->p.vrf && s->src && s->src->p.vrf && (p->p.vrf != s->src->p.vrf))
return 0;
/* Keep it when exported to internal peers */
@@ -1163,7 +1163,7 @@ bgp_use_gateway(struct bgp_export_state *s)
return 0;
/* Do not use gateway from different VRF */
- if (p->p.vrf_set && ra->nh.iface && (p->p.vrf != ra->nh.iface->master))
+ if (p->p.vrf && ra->nh.iface && (p->p.vrf != ra->nh.iface->master))
return 0;
/* Use it when exported to internal peers */
diff --git a/proto/ospf/iface.c b/proto/ospf/iface.c
index 87e3d95e..84c53aa1 100644
--- a/proto/ospf/iface.c
+++ b/proto/ospf/iface.c
@@ -1227,7 +1227,7 @@ ospf_reconfigure_ifaces2(struct ospf_proto *p)
WALK_LIST(iface, iface_list)
{
- if (p->p.vrf_set && p->p.vrf != iface->master)
+ if (p->p.vrf && p->p.vrf != iface->master)
continue;
if (! (iface->flags & IF_UP))
@@ -1276,7 +1276,7 @@ ospf_reconfigure_ifaces3(struct ospf_proto *p)
WALK_LIST(iface, iface_list)
{
- if (p->p.vrf_set && p->p.vrf != iface->master)
+ if (p->p.vrf && p->p.vrf != iface->master)
continue;
if (! (iface->flags & IF_UP))
diff --git a/proto/radv/radv.c b/proto/radv/radv.c
index 119a8dc4..8b547f6d 100644
--- a/proto/radv/radv.c
+++ b/proto/radv/radv.c
@@ -663,7 +663,7 @@ radv_reconfigure(struct proto *P, struct proto_config *CF)
struct iface *iface;
WALK_LIST(iface, iface_list)
{
- if (p->p.vrf_set && p->p.vrf != iface->master)
+ if (p->p.vrf && p->p.vrf != iface->master)
continue;
if (!(iface->flags & IF_UP))
diff --git a/proto/rip/rip.c b/proto/rip/rip.c
index 8c2d5aeb..ca218846 100644
--- a/proto/rip/rip.c
+++ b/proto/rip/rip.c
@@ -797,7 +797,7 @@ rip_reconfigure_ifaces(struct rip_proto *p, struct rip_config *cf)
WALK_LIST(iface, iface_list)
{
- if (p->p.vrf_set && p->p.vrf != iface->master)
+ if (p->p.vrf && p->p.vrf != iface->master)
continue;
if (!(iface->flags & IF_UP))