]> git.puffer.fish Git - mirror/frr.git/commitdiff
[bgpd] Avoid zombie accepted peer entries
authorTimo Teräs <timo.teras@iki.fi>
Tue, 17 Feb 2009 10:14:23 +0000 (12:14 +0200)
committerPaul Jakma <paul@quagga.net>
Tue, 21 Jul 2009 12:15:32 +0000 (13:15 +0100)
Currently, when accepting the connection, it can be left as zombie, when the
peer just initiates a connection, but never sends data (and the TCP
connection end packets are lost).  This happens because for accepted
connections a temporary new peer entry is created until OPEN message is
exchanged, and this temporary peer entry does not get the hold time
parameter set at all.

* bgp_network.c: (bgp_accept) Set hold time and keepalive values for ACCEPT
  peers.

bgpd/bgp_network.c

index aa019be6373a50e6aa957540b83f99494d33b8eb..7784700819b3fd81639e482423a1b0af7792cc90 100644 (file)
@@ -185,6 +185,8 @@ bgp_accept (struct thread *thread)
     peer->fd = bgp_sock;
     peer->status = Active;
     peer->local_id = peer1->local_id;
+    peer->v_holdtime = peer1->v_holdtime;
+    peer->v_keepalive = peer1->v_keepalive;
 
     /* Make peer's address string. */
     sockunion2str (&su, buf, SU_ADDRSTRLEN);