summaryrefslogtreecommitdiffstats
path: root/proto/bgp/packets.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-04-19 15:54:35 +0200
committerMartin Mares <mj@ucw.cz>2000-04-19 15:54:35 +0200
commit5f532adde20300ecab63d3e521fb0dfbfb33df2b (patch)
treed962dfad07984d1a1d0296fa66a94bc4ea7a7656 /proto/bgp/packets.c
parentf381cdce5225c0652bf9182ac40a1a54436c9692 (diff)
downloadbird-5f532adde20300ecab63d3e521fb0dfbfb33df2b.tar
bird-5f532adde20300ecab63d3e521fb0dfbfb33df2b.zip
Temporarily ignore unknown options.
Diffstat (limited to 'proto/bgp/packets.c')
-rw-r--r--proto/bgp/packets.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c
index f1555ca..514e67a 100644
--- a/proto/bgp/packets.c
+++ b/proto/bgp/packets.c
@@ -226,8 +226,10 @@ bgp_rx_open(struct bgp_conn *conn, byte *pkt, int len)
if (hold > 0 && hold < 3)
{ bgp_error(conn, 2, 6, hold, 0); return; }
p->remote_id = id;
+#if 0 /* FIXME */
if (pkt[28]) /* Currently we support no optional parameters */
{ bgp_error(conn, 2, 4, pkt[28], 0); return; }
+#endif
if (!id || id == 0xffffffff || id == p->local_id)
{ bgp_error(conn, 2, 3, id, 0); return; }
@@ -455,11 +457,10 @@ bgp_rx(sock *sk, int size)
bgp_error(conn, 1, 2, len, 2);
break;
}
- if (end >= pkt_start + len)
- {
- bgp_rx_packet(conn, pkt_start, len);
- pkt_start += len;
- }
+ if (end < pkt_start + len)
+ break;
+ bgp_rx_packet(conn, pkt_start, len);
+ pkt_start += len;
}
if (pkt_start != sk->rbuf)
{