]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_ecommunity.c
bgpd isisd lib: fix return on void functions
[mirror_frr.git] / bgpd / bgp_ecommunity.c
index 2c372124d2935b51f2bdd5e926f278eec4ab51c0..8029164184fe46d566e2967c32a1be210d8c8f4b 100644 (file)
@@ -253,16 +253,16 @@ unsigned int ecommunity_hash_make(void *arg)
 }
 
 /* Compare two Extended Communities Attribute structure.  */
-int ecommunity_cmp(const void *arg1, const void *arg2)
+bool ecommunity_cmp(const void *arg1, const void *arg2)
 {
        const struct ecommunity *ecom1 = arg1;
        const struct ecommunity *ecom2 = arg2;
 
        if (ecom1 == NULL && ecom2 == NULL)
-               return 1;
+               return true;
 
        if (ecom1 == NULL || ecom2 == NULL)
-               return 0;
+               return false;
 
        return (ecom1->size == ecom2->size
                && memcmp(ecom1->val, ecom2->val, ecom1->size * ECOMMUNITY_SIZE)
@@ -739,6 +739,13 @@ char *ecommunity_ecom2str(struct ecommunity *ecom, int format, int filter)
                                else
                                        len = sprintf(str_buf + str_pnt,
                                                      "MM:%u", seqnum);
+                       } else if (*pnt == ECOMMUNITY_EVPN_SUBTYPE_ND) {
+                               uint8_t flags = *++pnt;
+
+                               if (flags
+                                   & ECOMMUNITY_EVPN_SUBTYPE_ND_ROUTER_FLAG)
+                                       len = sprintf(str_buf + str_pnt,
+                                                     "ND:Router Flag");
                        } else
                                unk_ecom = 1;
                } else if (type == ECOMMUNITY_ENCODE_REDIRECT_IP_NH) {