diff options
author | Denis Ovsienko <infrastation@yandex.ru> | 2011-09-27 15:35:39 +0400 |
---|---|---|
committer | Denis Ovsienko <infrastation@yandex.ru> | 2011-10-17 18:27:32 +0400 |
commit | 19e7654a293cd76854eb5cf98707826efb639326 (patch) | |
tree | b2ebdd87ace0f5721ac0075da4eee2181af63051 | |
parent | 17801d1e8bf377ec8e4962dda0293de935629903 (diff) |
bgpd: ignore 4 bits of attribute flags byte
-rw-r--r-- | bgpd/bgp_attr.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index 1300ab84..251f1568 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 */ |