/* EVPN enable - advertise svi macip routes */
int advertise_svi_macip;
+ /* PIP feature knob */
+ bool advertise_pip;
+ /* PIP IP (sys ip) */
+ struct in_addr pip_ip;
+ struct in_addr pip_ip_static;
+ /* PIP MAC (sys MAC) */
+ struct ethaddr pip_rmac;
+ struct ethaddr pip_rmac_static;
+ struct ethaddr pip_rmac_zebra;
+ bool is_anycast_mac;
};
static inline int is_vrf_rd_configured(struct bgp *bgp_vrf)
listnode_delete(vpn->bgp_vrf->l2vnis, vpn);
/* remove the backpointer to the vrf instance */
+ bgp_unlock(vpn->bgp_vrf);
vpn->bgp_vrf = NULL;
}
return;
/* associate the vpn to the bgp_vrf instance */
- vpn->bgp_vrf = bgp_vrf;
+ vpn->bgp_vrf = bgp_lock(bgp_vrf);
listnode_add_sort(bgp_vrf->l2vnis, vpn);
/* check if we are advertising two labels for this vpn */
return (CHECK_FLAG(vpn->flags, VNI_FLAG_LIVE));
}
+static inline int is_l3vni_live(struct bgp *bgp_vrf)
+{
+ return (bgp_vrf->l3vni && bgp_vrf->l3vni_svi_ifindex);
+}
+
static inline int is_rd_configured(struct bgpevpn *vpn)
{
return (CHECK_FLAG(vpn->flags, VNI_FLAG_RD_CFGD));
return CHECK_FLAG(es->flags, EVPNES_LOCAL) ? 1 : 0;
}
+static inline bool bgp_evpn_is_svi_macip_enabled(struct bgpevpn *vpn)
+{
+ struct bgp *bgp_evpn = NULL;
+
+ bgp_evpn = bgp_get_evpn();
+
+ return (bgp_evpn->evpn_info->advertise_svi_macip ||
+ vpn->advertise_svi_macip);
+}
+
extern void bgp_evpn_install_uninstall_default_route(struct bgp *bgp_vrf,
afi_t afi, safi_t safi,
bool add);
struct ipaddr *originator_ip);
extern void bgp_evpn_es_free(struct bgp *bgp, struct evpnes *es);
extern bool bgp_evpn_lookup_l3vni_l2vni_table(vni_t vni);
+extern int update_routes_for_vni(struct bgp *bgp, struct bgpevpn *vpn);
#endif /* _BGP_EVPN_PRIVATE_H */