diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2018-02-09 03:53:38 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2018-02-09 03:53:38 +0000 |
commit | a03d74c28ae88ea0249c512b98cf80f0df457d3e (patch) | |
tree | 6171813f619eba7fe305d3d40e817ed482bf7143 /usr.sbin/ospf6d | |
parent | ce78b610bcc333b5edc3b5e70697f5d8d76d8cfc (diff) |
Clear the dr and bdr fields of a neighbor when it goes down.
Same is done in ospfd for quite a while.
Diffstat (limited to 'usr.sbin/ospf6d')
-rw-r--r-- | usr.sbin/ospf6d/neighbor.c | 10 |
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; |