]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_attr.c
bgpd: support evpn nd ext community
[mirror_frr.git] / bgpd / bgp_attr.c
index 6596e7cfa2643d1e4b650ecdeb4d5705d3762230..e5ad5e23387ab3fa2bc348f0afd9bb050292ce0c 100644 (file)
@@ -1890,6 +1890,16 @@ bgp_attr_ext_communities(struct bgp_attr_parser_args *args)
        /* Check if this is a Gateway MAC-IP advertisement */
        attr->default_gw = bgp_attr_default_gw(attr);
 
+       /* Handle scenario where router flag ecommunity is not
+        * set but default gw ext community is present.
+        * Use default gateway, set and propogate R-bit.
+        */
+       if (attr->default_gw)
+               attr->router_flag = 1;
+
+       /* Check EVPN Neighbor advertisement flags, R-bit */
+       bgp_attr_evpn_na_flag(attr, &attr->router_flag);
+
        /* Extract the Rmac, if any */
        bgp_attr_rmac(attr, &attr->rmac);