]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: Lookup dad and replication settings from EVPN VRF
authorTuetuopay <tuetuopay@me.com>
Fri, 22 Mar 2019 10:08:01 +0000 (11:08 +0100)
committerTuetuopay <tuetuopay@me.com>
Fri, 22 Mar 2019 10:08:01 +0000 (11:08 +0100)
Signed-off-by: Tuetuopay <tuetuopay@me.com>
Sponsored-by: Scaleway
zebra/zebra_vxlan.c
zebra/zebra_vxlan.h

index 9b7eadf728b3e8a1a02875c2dd39f71567f0d3cd..88a4375238e3720eb6db8a5b59db12f77c6595fb 100644 (file)
@@ -704,11 +704,10 @@ static void zvni_print_neigh(zebra_neigh_t *n, void *ctxt, json_object *json)
        struct zebra_vrf *zvrf = NULL;
        struct timeval detect_start_time = {0, 0};
 
-       zvrf = zebra_vrf_lookup_by_id(VRF_DEFAULT);
+       zvrf = zebra_vrf_get_evpn();
        if (!zvrf)
                return;
 
-       zvrf = zebra_vrf_lookup_by_id(VRF_DEFAULT);
        ipaddr2str(&n->ip, buf2, sizeof(buf2));
        prefix_mac2str(&n->emac, buf1, sizeof(buf1));
        type_str = CHECK_FLAG(n->flags, ZEBRA_NEIGH_LOCAL) ?
@@ -1152,7 +1151,9 @@ static void zvni_print_mac(zebra_mac_t *mac, void *ctxt, json_object *json)
        struct zebra_vrf *zvrf;
        struct timeval detect_start_time = {0, 0};
 
-       zvrf = zebra_vrf_lookup_by_id(VRF_DEFAULT);
+       zvrf = zebra_vrf_get_evpn();
+       if (!zvrf)
+               return;
 
        vty = (struct vty *)ctxt;
        prefix_mac2str(&mac->macaddr, buf1, sizeof(buf1));
index 38fef4b988c6b39bb3a952c0d1f38347d212081b..6ca33ae15943d49ff2babf543004b93f62cc6a8d 100644 (file)
@@ -47,7 +47,7 @@ static inline int is_evpn_enabled(void)
 static inline int
 is_vxlan_flooding_head_end(void)
 {
-       struct zebra_vrf *zvrf = zebra_vrf_lookup_by_id(VRF_DEFAULT);
+       struct zebra_vrf *zvrf = zebra_vrf_get_evpn();
 
        if (!zvrf)
                return 0;