Mailing List Archive

bgpd fixes for unh failures
Hi,

Here are some fixes for UNH-BGP-4 failures. Note that even though
UNH had not reported 3.11 as a failure in the last round of testing
with HP, the code has a bug, and is likely to fail if tested again.

The specifics are:

bgp_packet.c
- UNH-BGP-4.3.1.b: ignore KEEPALIVE messages with unexpected marker fields
- UNH-BGP-4.3.11.a: send a "Collision detect" notification on the *new*
connection when value of local bgp ID is greater than the value of
remote bgp id

bgp_route.c
- UNH-BGP-4.3.8.a: do not send UPDATE message for semantically incorrect
NLRI field

--Sowmini


===================================================================
RCS file: bgpd/bgp_packet.c,v
retrieving revision 1.6
diff -uwb -r1.6 bgpd/bgp_packet.c
--- bgpd/bgp_packet.c 2004/06/04 17:58:18 1.6
+++ bgpd/bgp_packet.c 2004/06/16 16:53:19
@@ -1117,7 +1117,8 @@
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 @@
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 @@
{
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 */
===================================================================
RCS file: bgpd/bgp_route.c,v
retrieving revision 1.15
diff -uwb -r1.15 bgpd/bgp_route.c
--- bgpd/bgp_route.c 2004/06/04 17:58:18 1.15
+++ bgpd/bgp_route.c 2004/06/16 16:58:07
@@ -1688,12 +1688,21 @@
{
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));
+#ifdef notdef
bgp_notify_send (peer,
BGP_NOTIFY_UPDATE_ERR,
BGP_NOTIFY_UPDATE_INVAL_NETWORK);
+#endif
return -1;
}
}
Re: bgpd fixes for unh failures [ In reply to ]
applied, cheers.

regards,
--
Paul Jakma paul@clubi.ie paul@jakma.org Key ID: 64A2FF6A
warning: do not ever send email to spam@dishone.st
Fortune:
Push where it gives and scratch where it itches.