summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2009-02-17 12:14:23 +0200
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-05-07 09:42:03 -0700
commit277bb2e1da44673119cbbdf3255fa22f4fbc2243 (patch)
treec8c503d5a4b0d3eb3123fde734da535308ec8f6d
parent1dc80446ebaa5905fabd18a85f8d608ef24200b3 (diff)
downloadquagga-277bb2e1da44673119cbbdf3255fa22f4fbc2243.tar.bz2
quagga-277bb2e1da44673119cbbdf3255fa22f4fbc2243.tar.xz
avoid zombie accepted peer entries
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. Signed-off-by: Timo Teras <timo.teras@iki.fi>
-rw-r--r--bgpd/bgp_network.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c
index 6d16c6ec..a7d75478 100644
--- a/bgpd/bgp_network.c
+++ b/bgpd/bgp_network.c
@@ -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);