summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ldpd')
-rw-r--r--usr.sbin/ldpd/init.c5
-rw-r--r--usr.sbin/ldpd/neighbor.c7
-rw-r--r--usr.sbin/ldpd/notification.c5
3 files changed, 7 insertions, 10 deletions
diff --git a/usr.sbin/ldpd/init.c b/usr.sbin/ldpd/init.c
index dd366f5267c..c62e5c581d5 100644
--- a/usr.sbin/ldpd/init.c
+++ b/usr.sbin/ldpd/init.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init.c,v 1.18 2016/05/23 15:43:11 renato Exp $ */
+/* $OpenBSD: init.c,v 1.19 2016/05/23 15:59:55 renato Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -109,8 +109,7 @@ recv_init(struct nbr *nbr, char *buf, u_int16_t len)
nbr->keepalive = min(nbr_get_keepalive(nbr->raddr),
ntohs(sess.keepalive_time));
- if (!nbr_pending_idtimer(nbr))
- nbr_fsm(nbr, NBR_EVT_INIT_RCVD);
+ nbr_fsm(nbr, NBR_EVT_INIT_RCVD);
return (ntohs(init.length));
}
diff --git a/usr.sbin/ldpd/neighbor.c b/usr.sbin/ldpd/neighbor.c
index 566cefc57bb..e49373166c8 100644
--- a/usr.sbin/ldpd/neighbor.c
+++ b/usr.sbin/ldpd/neighbor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: neighbor.c,v 1.58 2016/05/23 15:57:50 renato Exp $ */
+/* $OpenBSD: neighbor.c,v 1.59 2016/05/23 15:59:55 renato Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -386,10 +386,7 @@ nbr_idtimer(int fd, short event, void *arg)
log_debug("%s: neighbor ID %s", __func__, inet_ntoa(nbr->id));
- if (nbr_session_active_role(nbr))
- nbr_establish_connection(nbr);
- else if (nbr->state == NBR_STA_INITIAL)
- nbr_fsm(nbr, NBR_EVT_INIT_RCVD);
+ nbr_establish_connection(nbr);
}
void
diff --git a/usr.sbin/ldpd/notification.c b/usr.sbin/ldpd/notification.c
index cc0c7ac8dba..0e42ea53c21 100644
--- a/usr.sbin/ldpd/notification.c
+++ b/usr.sbin/ldpd/notification.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: notification.c,v 1.19 2016/05/23 15:14:08 renato Exp $ */
+/* $OpenBSD: notification.c,v 1.20 2016/05/23 15:59:55 renato Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -223,11 +223,12 @@ recv_notification(struct nbr *nbr, char *buf, u_int16_t len)
notification_name(ntohl(st.status_code)));
if (st.status_code & htonl(STATUS_FATAL)) {
- if (st.status_code == htonl(S_NO_HELLO) ||
+ if ((st.status_code == htonl(S_NO_HELLO) ||
st.status_code == htonl(S_PARM_ADV_MODE) ||
st.status_code == htonl(S_MAX_PDU_LEN) ||
st.status_code == htonl(S_PARM_L_RANGE) ||
st.status_code == htonl(S_KEEPALIVE_BAD))
+ && nbr_session_active_role(nbr))
nbr_start_idtimer(nbr);
nbr_fsm(nbr, NBR_EVT_CLOSE_SESSION);