]> git.puffer.fish Git - matthieu/frr.git/commitdiff
2004-07-09 Sowmini Varadhan <sowmini.varadhan@sun.com>
authorpaul <paul>
Fri, 9 Jul 2004 12:11:31 +0000 (12:11 +0000)
committerpaul <paul>
Fri, 9 Jul 2004 12:11:31 +0000 (12:11 +0000)
        * bgp_packet.c: (bgp_collision_detect) Send NOTIFY on new socket
          if that is connection we're closing.
          (bgp_read) invalid marker check applies to KEEPALIVE too.
        * bgp_route.c: Ignore multicast NRLI, dont send NOTIFY.

bgpd/ChangeLog
bgpd/bgp_packet.c
bgpd/bgp_route.c

index 7603dc5d9fbc39069412e7106c4b1a36aa3f30de..0e81fc08868ada807b7cab9952bd865d2666eebf 100644 (file)
@@ -1,3 +1,10 @@
+2004-07-09 Sowmini Varadhan <sowmini.varadhan@sun.com>
+
+       * bgp_packet.c: (bgp_collision_detect) Send NOTIFY on new socket
+         if that is connection we're closing.
+         (bgp_read) invalid marker check applies to KEEPALIVE too.
+       * bgp_route.c: Ignore multicast NRLI, dont send NOTIFY.
+       
 2004-06-04 Paul Jakma <paul@dishone.st>
 
        * type mismatch fixes
index 316c44e2f22567331f1738f934745fe82bf3f074..37f5afdca68bd3eca6d05b0d7aff3be332d51f78 100644 (file)
@@ -1117,7 +1117,8 @@ bgp_collision_detect (struct peer *new, struct in_addr remote_id)
                 OpenConfirm state). */
 
              if (new->fd >= 0)
-               bgp_notify_send (peer, BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_COLLISION_RESOLUTION);
+               bgp_notify_send (new, BGP_NOTIFY_CEASE, 
+                                BGP_NOTIFY_CEASE_COLLISION_RESOLUTION);
              return -1;
            }
        }
@@ -2147,7 +2148,7 @@ bgp_read (struct thread *thread)
                   peer->host, type, size - BGP_HEADER_SIZE);
 
       /* Marker check */
-      if (type == BGP_MSG_OPEN
+      if (((type == BGP_MSG_OPEN) || (type == BGP_MSG_KEEPALIVE))
          && ! bgp_marker_all_one (peer->ibuf, BGP_MARKER_SIZE))
        {
          bgp_notify_send (peer,
@@ -2219,7 +2220,7 @@ bgp_read (struct thread *thread)
     {
     case BGP_MSG_OPEN:
       peer->open_in++;
-      bgp_open_receive (peer, size);
+      bgp_open_receive (peer, size); /* XXX return value ignored! */
       break;
     case BGP_MSG_UPDATE:
       peer->readtime = time(NULL);    /* Last read timer reset */
index 1dd8b57127262204680421043f68e609acfd24e8..cf65964b66098b8fd3f2f676dafd9560d245a76a 100644 (file)
@@ -1688,12 +1688,17 @@ bgp_nlri_parse (struct peer *peer, struct attr *attr, struct bgp_nlri *packet)
        {
          if (IN_CLASSD (ntohl (p.u.prefix4.s_addr)))
            {
+            /* 
+             * From draft-ietf-idr-bgp4-22, Section 6.3: 
+             * If a BGP router receives an UPDATE message with a
+             * semantically incorrect NLRI field, in which a prefix is
+             * semantically incorrect (eg. an unexpected multicast IP
+             * address), it should ignore the prefix.
+             */
              zlog (peer->log, LOG_ERR, 
                    "IPv4 unicast NLRI is multicast address %s",
                    inet_ntoa (p.u.prefix4));
-             bgp_notify_send (peer, 
-                              BGP_NOTIFY_UPDATE_ERR, 
-                              BGP_NOTIFY_UPDATE_INVAL_NETWORK);
+
              return -1;
            }
        }