]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Modify attr->flag to be 64 bit
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 10 Mar 2017 12:59:52 +0000 (07:59 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 7 Sep 2017 11:25:37 +0000 (07:25 -0400)
With the some current bgp drafts the Attribute number has
surpassed 32.  Which is a bit unfortunate in that we keep
track of the attributes via a bitfield based on the attribute #.

For the moment since I am not aware of Attribute #'s being
greater than 64, convert the flag to 64 bit and allow the
bit shifting to know about it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_attr.h

index 8ca95680adb4dd7a7ab68bc2d288c71f6fe15aa1..c6b687347b8fd69a41dbafb7091575d6cd12aa38 100644 (file)
@@ -155,7 +155,7 @@ struct attr {
        unsigned long refcnt;
 
        /* Flag of attribute is set or not. */
-       u_int32_t flag;
+       uint64_t flag;
 
        /* Apart from in6_addr, the remaining static attributes */
        struct in_addr nexthop;
@@ -194,7 +194,7 @@ struct transit {
        u_char *val;
 };
 
-#define ATTR_FLAG_BIT(X)  (1 << ((X) - 1))
+#define ATTR_FLAG_BIT(X)  (1ULL << ((X) - 1))
 
 #define BGP_CLUSTER_LIST_LENGTH(attr)                                          \
        (((attr)->flag & ATTR_FLAG_BIT(BGP_ATTR_CLUSTER_LIST))                 \