summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Ovsienko <infrastation@yandex.ru>2011-10-27 20:04:08 +0400
committerDenis Ovsienko <infrastation@yandex.ru>2011-11-21 18:35:48 +0400
commit9ebf400a1c21117ff40cb78f0b023bf1cb4e9f6c (patch)
treedeaa8ecbb01ac76aef67e4c95f435459bf684d0a
parent0f572cde26208254f779933f0e8ec953ad2a3a8a (diff)
bgpd: fix AS4_PATH attr flag check (BZ#676)
AS_PATH is a well-known, transitive path attribute and cannot be flagged as "Partial". This is what commit 77a20b8af32c926176f8492a086d9e4ec670496b implemented, but it did not account, that bgp_attr_aspath() is also used to process AS4_PATH, which is an optional, transitive path attribute and as such may be flagged as "Partial". This change justfies the test condition.
-rw-r--r--bgpd/bgp_attr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c
index 4967e09a..2205e267 100644
--- a/bgpd/bgp_attr.c
+++ b/bgpd/bgp_attr.c
@@ -826,7 +826,7 @@ bgp_attr_aspath (struct peer *peer, bgp_size_t length,
total = length + (CHECK_FLAG (flag, BGP_ATTR_FLAG_EXTLEN) ? 4 : 3);
/* Check the attribute flags */
- if (CHECK_FLAG (flag, BGP_ATTR_FLAG_PARTIAL))
+ if (!as4_path && CHECK_FLAG (flag, BGP_ATTR_FLAG_PARTIAL))
{
zlog (peer->log, LOG_ERR,
"AS_PATH attribute must not be flagged as \"partial\" (%u)", flag);