summaryrefslogtreecommitdiffstats
path: root/proto/bgp
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-02-02 10:14:21 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2010-02-02 10:14:21 +0100
commit44f26560ec9f108039e6736d6de929f899bf20ea (patch)
tree7c712ec596cfb53141779e9eebb4cc73f44f86f8 /proto/bgp
parent5f47c4c11ed8da3415c4c8c247bf52ab6a48255d (diff)
downloadbird-44f26560ec9f108039e6736d6de929f899bf20ea.tar
bird-44f26560ec9f108039e6736d6de929f899bf20ea.zip
Workaround for some broken BGP implementations that skip initial KEEPALIVE.
Diffstat (limited to 'proto/bgp')
-rw-r--r--proto/bgp/packets.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c
index 03cc4ee..329efb3 100644
--- a/proto/bgp/packets.c
+++ b/proto/bgp/packets.c
@@ -1001,6 +1001,10 @@ bgp_rx_update(struct bgp_conn *conn, byte *pkt, int len)
BGP_TRACE_RL(&rl_rcv_update, D_PACKETS, "Got UPDATE");
+ /* Workaround for some BGP implementations that skip initial KEEPALIVE */
+ if (conn->state == BS_OPENCONFIRM)
+ bgp_conn_enter_established_state(conn);
+
if (conn->state != BS_ESTABLISHED)
{ bgp_error(conn, 5, 0, NULL, 0); return; }
bgp_start_timer(conn->hold_timer, conn->hold_time);