From: Denis Ovsienko Date: Tue, 27 Sep 2011 11:35:39 +0000 (+0400) Subject: bgpd: ignore 4 bits of attribute flags byte X-Git-Tag: frr-2.0-rc1~1918^2~87 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=19e7654a293cd76854eb5cf98707826efb639326;p=mirror%2Ffrr.git bgpd: ignore 4 bits of attribute flags byte --- diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index 1300ab84ba..251f15680b 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -1697,7 +1697,10 @@ bgp_attr_parse (struct peer *peer, struct attr *attr, bgp_size_t size, /* Fetch attribute flag and type. */ startp = BGP_INPUT_PNT (peer); - flag = stream_getc (BGP_INPUT (peer)); + /* "The lower-order four bits of the Attribute Flags octet are + unused. They MUST be zero when sent and MUST be ignored when + received." */ + flag = 0xF0 & stream_getc (BGP_INPUT (peer)); type = stream_getc (BGP_INPUT (peer)); /* Check whether Extended-Length applies and is in bounds */