]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: rmap_type is 8 bit but we have 9 bits of flags 5046/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 24 Sep 2019 12:24:10 +0000 (08:24 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 24 Sep 2019 12:29:46 +0000 (08:29 -0400)
The newly added PEER_RMAP_TYPE_AGGREGATE flag is setup to
be the 9th bit:

But the flag we are putting it into:
uint8_t rmap_type;

is 8 bits.  Adjust the size.

Found by Coverity SA Scan
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgpd.h

index 9d45d96987db8a950505ca266e1f19be2afe31e4..320f1ec96cbcf89ef3a8d0a90b506e0df2eca386 100644 (file)
@@ -1202,7 +1202,7 @@ struct peer {
        uint8_t last_reset_cause[BGP_MAX_PACKET_SIZE];
 
        /* The kind of route-map Flags.*/
-       uint8_t rmap_type;
+       uint16_t rmap_type;
 #define PEER_RMAP_TYPE_IN             (1 << 0) /* neighbor route-map in */
 #define PEER_RMAP_TYPE_OUT            (1 << 1) /* neighbor route-map out */
 #define PEER_RMAP_TYPE_NETWORK        (1 << 2) /* network route-map */