summaryrefslogtreecommitdiff
path: root/proto/bgp/bgp.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2008-12-24 17:24:41 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2008-12-24 17:24:41 +0100
commit165a62272720071ca5e9ed1badfddc78b7a7af10 (patch)
tree5d7a1b37cd38d25a2264527616ee58e8f1b6f97a /proto/bgp/bgp.c
parent591211557f4106ed9e877fa9b80eb56ffb99fef3 (diff)
Adds support for fallback to capabilityless BGP connect
When capability related error is received, next connect will be without capabilities. Also cease error subcodes descriptions (according to [RFC4486]) are added.
Diffstat (limited to 'proto/bgp/bgp.c')
-rw-r--r--proto/bgp/bgp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c
index d1b7dee9..558b1e8c 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -368,6 +368,10 @@ bgp_conn_enter_idle_state(struct bgp_conn *conn)
static void
bgp_send_open(struct bgp_conn *conn)
{
+ conn->start_state = conn->bgp->start_state;
+ conn->want_as4_support = conn->bgp->cf->enable_as4 && (conn->start_state != BSS_CONNECT_NOCAP);
+ conn->peer_as4_support = 0; // Default value, possibly changed by receiving capability.
+
DBG("BGP: Sending open\n");
conn->sk->rx_hook = bgp_rx;
conn->sk->tx_hook = bgp_tx;