summaryrefslogtreecommitdiff
path: root/usr.sbin/ospfd
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2010-02-16 18:13:53 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2010-02-16 18:13:53 +0000
commit3715941ea980010840dd18a0fc6516603692a003 (patch)
tree09a2e45976bd4cc08a5510e1ebc0a3c251a0382f /usr.sbin/ospfd
parent975b2b6b6555c17180e88f6d1d3c601210b90101 (diff)
Clear the DR and BDR addresses in nbr_act_delete(), makes the election
process more reliable after interface flaps. Especially when the router-id changed at the same time. OK dlg@, sthen@
Diffstat (limited to 'usr.sbin/ospfd')
-rw-r--r--usr.sbin/ospfd/neighbor.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/ospfd/neighbor.c b/usr.sbin/ospfd/neighbor.c
index ed7f5492807..41b9fde0f37 100644
--- a/usr.sbin/ospfd/neighbor.c
+++ b/usr.sbin/ospfd/neighbor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: neighbor.c,v 1.39 2009/09/30 14:39:07 claudio Exp $ */
+/* $OpenBSD: neighbor.c,v 1.40 2010/02/16 18:13:52 claudio Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -585,8 +585,11 @@ nbr_act_delete(struct nbr *nbr)
{
struct timeval tv;
- if (nbr == nbr->iface->self)
+ if (nbr == nbr->iface->self) {
+ nbr->dr.s_addr = 0;
+ nbr->bdr.s_addr = 0;
return (0);
+ }
/* stop timers */
nbr_stop_itimer(nbr);
@@ -594,6 +597,7 @@ nbr_act_delete(struct nbr *nbr)
/* clear dr and bdr */
nbr->dr.s_addr = 0;
nbr->bdr.s_addr = 0;
+ /* XXX reset crypt_seq_num will allow replay attacks. */
nbr->crypt_seq_num = 0;
/* schedule kill timer */