summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2018-02-09 03:53:37 +0000
committerclaudio <claudio@openbsd.org>2018-02-09 03:53:37 +0000
commitcb595d3fff6be37300dc13d777fc788bd12b7773 (patch)
treec98a7c148a714abcfaa09c4dc992d7eaa45fde7c
parentSkip sftp-chroot test when SUDO not set instead of fatal(). (diff)
downloadwireguard-openbsd-cb595d3fff6be37300dc13d777fc788bd12b7773.tar.xz
wireguard-openbsd-cb595d3fff6be37300dc13d777fc788bd12b7773.zip
Clear the dr and bdr fields of a neighbor when it goes down.
Same is done in ospfd for quite a while.
-rw-r--r--usr.sbin/ospf6d/neighbor.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/ospf6d/neighbor.c b/usr.sbin/ospf6d/neighbor.c
index b750d7faae8..d7e639a6eab 100644
--- a/usr.sbin/ospf6d/neighbor.c
+++ b/usr.sbin/ospf6d/neighbor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: neighbor.c,v 1.13 2013/03/25 14:29:35 markus Exp $ */
+/* $OpenBSD: neighbor.c,v 1.14 2018/02/09 03:53:37 claudio Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -603,16 +603,16 @@ nbr_act_delete(struct nbr *nbr)
{
struct timeval tv;
+ /* clear dr and bdr */
+ nbr->dr.s_addr = 0;
+ nbr->bdr.s_addr = 0;
+
if (nbr == nbr->iface->self)
return (0);
/* stop timers */
nbr_stop_itimer(nbr);
- /* clear dr and bdr */
- nbr->dr.s_addr = 0;
- nbr->bdr.s_addr = 0;
-
/* schedule kill timer */
timerclear(&tv);
tv.tv_sec = DEFAULT_NBR_TMOUT;