diff options
author | Paul Jakma <paul.jakma@sun.com> | 2008-06-01 14:29:03 +0000 |
---|---|---|
committer | Paul Jakma <paul.jakma@sun.com> | 2008-06-01 14:29:03 +0000 |
commit | a15cfd16fcdec39588ce2f780671ba7c6de0b919 (patch) | |
tree | ccd6a9a654bfe0a7ae376d5e268d2749be06e6fa /bgpd/bgp_attr.c | |
parent | 0e7c124f870d4c95ff3edbde1a766717c696da7c (diff) |
[bgpd] bug #419: partial aspath-limit incorrectly causes session reset
2008-06-01 jfletche@gmail.com
* bgp_attr.c: (bgp_attr_aspathlimit) fix silly bug in flags check
that was causing BGP to drop sessions if it received a
aspath-limit with partial set. Fixes bug #419.
Diffstat (limited to 'bgpd/bgp_attr.c')
-rw-r--r-- | bgpd/bgp_attr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index 26f62f5a..9e7cccaa 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -695,7 +695,8 @@ bgp_attr_aspathlimit (struct peer *peer, bgp_size_t length, total = length + (CHECK_FLAG (flag, BGP_ATTR_FLAG_EXTLEN) ? 4 : 3); - if (flag != (BGP_ATTR_FLAG_TRANS|BGP_ATTR_FLAG_OPTIONAL)) + if (!CHECK_FLAG(flag, BGP_ATTR_FLAG_TRANS) + || !CHECK_FLAG(flag, BGP_ATTR_FLAG_OPTIONAL)) { zlog (peer->log, LOG_ERR, "AS-Pathlimit attribute flag isn't transitive %d", flag); @@ -804,7 +805,7 @@ bgp_attr_aspath (struct peer *peer, bgp_size_t length, || ! CHECK_FLAG (flag, BGP_ATTR_FLAG_TRANS)) { zlog (peer->log, LOG_ERR, - "Origin attribute flag isn't transitive %d", flag); + "As-Path attribute flag isn't transitive %d", flag); bgp_notify_send_with_data (peer, BGP_NOTIFY_UPDATE_ERR, BGP_NOTIFY_UPDATE_ATTR_FLAG_ERR, |