summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2013-06-01 18:21:45 +0000
committerclaudio <claudio@openbsd.org>2013-06-01 18:21:45 +0000
commitbc536444a256897d1e0e18a02cb2148a130af117 (patch)
treee7b81167257d6172cc5bb9fb9279300886571861
parentAfter returning from accept, we got a TCP connection not a LDP session. (diff)
downloadwireguard-openbsd-bc536444a256897d1e0e18a02cb2148a130af117.tar.xz
wireguard-openbsd-bc536444a256897d1e0e18a02cb2148a130af117.zip
After sending a keepalive message in the OPENSENT state, we must move to
the OPENREC state and wait for a keepalive before considering the session as established Another bug fix by Renato Westphal
-rw-r--r--usr.sbin/ldpd/neighbor.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/usr.sbin/ldpd/neighbor.c b/usr.sbin/ldpd/neighbor.c
index b189ad6a2e9..f1958488b04 100644
--- a/usr.sbin/ldpd/neighbor.c
+++ b/usr.sbin/ldpd/neighbor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: neighbor.c,v 1.28 2013/06/01 18:16:35 claudio Exp $ */
+/* $OpenBSD: neighbor.c,v 1.29 2013/06/01 18:21:45 claudio Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -103,7 +103,7 @@ struct {
{NBR_STA_OPENREC, NBR_EVT_KEEPALIVE_RCVD, NBR_ACT_SESSION_EST, NBR_STA_OPER},
/* Active Role */
{NBR_STA_PRESENT, NBR_EVT_INIT_SENT, NBR_ACT_NOTHING, NBR_STA_OPENSENT},
- {NBR_STA_OPENSENT, NBR_EVT_INIT_RCVD, NBR_ACT_KEEPALIVE_SEND, NBR_STA_OPER},
+ {NBR_STA_OPENSENT, NBR_EVT_INIT_RCVD, NBR_ACT_KEEPALIVE_SEND, NBR_STA_OPENREC},
/* Session Maintenance */
{NBR_STA_OPER, NBR_EVT_PDU_RCVD, NBR_ACT_RST_KTIMEOUT, 0},
/* Session Close */
@@ -193,12 +193,8 @@ nbr_fsm(struct nbr *nbr, enum nbr_event event)
send_keepalive(nbr);
break;
case NBR_ACT_KEEPALIVE_SEND:
- nbr_act_session_operational(nbr);
- nbr_start_ktimer(nbr);
nbr_start_ktimeout(nbr);
send_keepalive(nbr);
- send_address(nbr, NULL);
- nbr_send_labelmappings(nbr);
break;
case NBR_ACT_CLOSE_SESSION:
ldpe_imsg_compose_lde(IMSG_NEIGHBOR_DOWN, nbr->peerid, 0,