summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd/packet.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@cvs.openbsd.org>2016-06-13 20:19:41 +0000
committerRenato Westphal <renato@cvs.openbsd.org>2016-06-13 20:19:41 +0000
commit6c049eef8f288bea7deaa6dc9bc2672f93802b3f (patch)
treeebeb6a69eddc28f40b1e926626a104e3ae04771b /usr.sbin/ldpd/packet.c
parent8d0c21ec0c22a79077078afaab1297007e6c19bf (diff)
Implement a timeout for the session initialization FSM.
This prevents neighbors stuck in the initialization FSM to linger forever as long as the associated transport connection is up. This timeout can be seen in the 'Session Initialization State Transition Diagram' of RFC 5036. The RFC, however, doesn't specify how much we should wait. Let's use 180 seconds for that, the default LDP hold time. Fixes IxANVL LDP test 6.15.
Diffstat (limited to 'usr.sbin/ldpd/packet.c')
-rw-r--r--usr.sbin/ldpd/packet.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/ldpd/packet.c b/usr.sbin/ldpd/packet.c
index f8a7f45549b..a804a7f7c24 100644
--- a/usr.sbin/ldpd/packet.c
+++ b/usr.sbin/ldpd/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.62 2016/06/13 20:13:34 renato Exp $ */
+/* $OpenBSD: packet.c,v 1.63 2016/06/13 20:19:40 renato Exp $ */
/*
* Copyright (c) 2013, 2016 Renato Westphal <renato@openbsd.org>
@@ -648,6 +648,7 @@ session_close(struct nbr *nbr)
tcp_close(nbr->tcp);
nbr_stop_ktimer(nbr);
nbr_stop_ktimeout(nbr);
+ nbr_stop_itimeout(nbr);
}
static ssize_t