summaryrefslogtreecommitdiff
path: root/zebra/zebra_vxlan.c
diff options
context:
space:
mode:
authorTuetuopay <tuetuopay@me.com>2019-03-06 19:15:10 +0100
committerTuetuopay <tuetuopay@me.com>2019-03-19 11:56:25 +0100
commit530db8dc0398fabe8a88a2c614e14a1f3ccc1ba4 (patch)
tree08202409fabec39e2fd51c621118e1f462e51976 /zebra/zebra_vxlan.c
parent150971b5ecc3416496a2ffaf2a35c108c970553c (diff)
bgpd, zebra: Scope EVPN commands to EVPN VRF
If the EVPN VRF is not the default one (i.e. with advertise-all-vni), this allows showing its information with `show bgp l2evpn evpn ...` commands. They do not require adding `vrf VRFNAME` since we only support a single EVPN VRF. The same is true for zebra-specific commands (e.g. `show evpn ...`). Configuration commands are not restricted to the default VRF but to the EVPN one, that is to the one bearing `advertise-all-vni`. Signed-off-by: Tuetuopay <tuetuopay@me.com> Sponsored-by: Scaleway
Diffstat (limited to 'zebra/zebra_vxlan.c')
-rw-r--r--zebra/zebra_vxlan.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c
index fe7391f740..4debf5f2dc 100644
--- a/zebra/zebra_vxlan.c
+++ b/zebra/zebra_vxlan.c
@@ -3801,7 +3801,7 @@ static zebra_vni_t *zvni_lookup(vni_t vni)
zebra_vni_t tmp_vni;
zebra_vni_t *zvni = NULL;
- zvrf = vrf_info_lookup(VRF_DEFAULT);
+ zvrf = zebra_vrf_get_evpn();
assert(zvrf);
memset(&tmp_vni, 0, sizeof(zebra_vni_t));
tmp_vni.vni = vni;
@@ -3819,7 +3819,7 @@ static zebra_vni_t *zvni_add(vni_t vni)
zebra_vni_t tmp_zvni;
zebra_vni_t *zvni = NULL;
- zvrf = vrf_info_lookup(VRF_DEFAULT);
+ zvrf = zebra_vrf_get_evpn();
assert(zvrf);
memset(&tmp_zvni, 0, sizeof(zebra_vni_t));
tmp_zvni.vni = vni;
@@ -3845,7 +3845,7 @@ static int zvni_del(zebra_vni_t *zvni)
struct zebra_vrf *zvrf;
zebra_vni_t *tmp_zvni;
- zvrf = vrf_info_lookup(VRF_DEFAULT);
+ zvrf = zebra_vrf_get_evpn();
assert(zvrf);
zvni->vxlan_if = NULL;
@@ -6924,7 +6924,7 @@ void zebra_vxlan_print_evpn(struct vty *vty, bool uj)
if (!is_evpn_enabled())
return;
- zvrf = vrf_info_lookup(VRF_DEFAULT);
+ zvrf = zebra_vrf_get_evpn();
if (!zvrf)
return;