]> git.puffer.fish Git - matthieu/frr.git/commitdiff
[bgpd] bug #419: partial aspath-limit incorrectly causes session reset
authorPaul Jakma <paul.jakma@sun.com>
Sun, 1 Jun 2008 14:29:03 +0000 (14:29 +0000)
committerPaul Jakma <paul.jakma@sun.com>
Sun, 1 Jun 2008 14:29:03 +0000 (14:29 +0000)
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.

bgpd/ChangeLog
bgpd/bgp_attr.c

index 7f94565c3f3ba246fbd9809d496ffc41d9c76e3e..4630ab97925a217fa8dc9c8c286fcb285edc47aa 100644 (file)
@@ -1,4 +1,11 @@
+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.
+
 2008-04-10 Denis Ovsienko
+
        * bgp_aspath.[ch]: (aspath_filter_exclude) New function allows
          filtering out arbitrary ASns from AS_PATH attribute.
        * bgp_aspath.[ch]: (aspath_print_vty) Accept suffix to let calling
index 26f62f5af52d8fc5134d3efa780f7d1f14cf2842..9e7cccaae6a11b7c68ea5a2c2b936f5e1233a2f0 100644 (file)
@@ -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,