summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd/hello.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@cvs.openbsd.org>2016-06-09 17:26:33 +0000
committerRenato Westphal <renato@cvs.openbsd.org>2016-06-09 17:26:33 +0000
commitf429e0627900f54d72548e50b7af0b713296264f (patch)
treed6fb243a4b73a9a1af440f8eb23623c40016d6b3 /usr.sbin/ldpd/hello.c
parent5e5312976e5a2bcd103b6fb160a065a2496dc956 (diff)
Send a fatal notification when the last hello adjacency is deleted.
RFC 5036 says: "When the last Hello adjacency for an LDP session is deleted, the LSR terminates the LDP session by sending a Notification message and closing the transport connection". Send a "Hold Timer Expired" notification when the triggering event is a hello hold time timeout. In the other cases, like disabling LDP on an interface, send a "Shutdown" notification instead. Before this patch we were just closing the neighbor's transport connection. Fixes the following ANVL LDP tests: 7.17 and 23.3.
Diffstat (limited to 'usr.sbin/ldpd/hello.c')
-rw-r--r--usr.sbin/ldpd/hello.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ldpd/hello.c b/usr.sbin/ldpd/hello.c
index 1e16691de2e..5d8cd202f4a 100644
--- a/usr.sbin/ldpd/hello.c
+++ b/usr.sbin/ldpd/hello.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hello.c,v 1.44 2016/06/08 23:14:03 renato Exp $ */
+/* $OpenBSD: hello.c,v 1.45 2016/06/09 17:26:32 renato Exp $ */
/*
* Copyright (c) 2013, 2016 Renato Westphal <renato@openbsd.org>
@@ -279,7 +279,7 @@ recv_hello(struct in_addr lsr_id, struct ldp_msg *lm, int af,
session_shutdown(nbr, S_TRANS_MISMTCH, lm->msgid,
lm->type);
if (adj)
- adj_del(adj);
+ adj_del(adj, 0, 0);
return;
}