summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRenato Westphal <renato@cvs.openbsd.org>2016-01-15 12:41:51 +0000
committerRenato Westphal <renato@cvs.openbsd.org>2016-01-15 12:41:51 +0000
commit6edc9f3d18895d643ac6c23d9e2958e46c594c0b (patch)
tree30676d670cc764204b0e3aa8a75a7ab2a4f812a1
parentead8875a9047d57e61dafbc14a3d5a4da9346e06 (diff)
Fix bug that happened when a passive interface was shut down and then
reactivated.
-rw-r--r--usr.sbin/eigrpd/interface.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/usr.sbin/eigrpd/interface.c b/usr.sbin/eigrpd/interface.c
index 3f8437a6057..45edfc8f7dc 100644
--- a/usr.sbin/eigrpd/interface.c
+++ b/usr.sbin/eigrpd/interface.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: interface.c,v 1.11 2016/01/15 12:36:41 renato Exp $ */
+/* $OpenBSD: interface.c,v 1.12 2016/01/15 12:41:50 renato Exp $ */
/*
* Copyright (c) 2015 Renato Westphal <renato@openbsd.org>
@@ -359,9 +359,6 @@ eigrp_if_start(struct eigrp_iface *ei)
ei->self = nbr_new(ei, &addr, 0, 1);
nbr_init(ei->self);
- /* set event handlers for interface */
- evtimer_set(&ei->hello_timer, eigrp_if_hello_timer, ei);
-
TAILQ_FOREACH(if_addr, &ei->iface->addr_list, entry) {
if (if_addr->af != eigrp->af)
continue;
@@ -386,6 +383,7 @@ eigrp_if_start(struct eigrp_iface *ei)
fatalx("eigrp_if_start: unknown af");
}
+ evtimer_set(&ei->hello_timer, eigrp_if_hello_timer, ei);
eigrp_if_start_hello_timer(ei);
}
@@ -402,6 +400,9 @@ eigrp_if_reset(struct eigrp_iface *ei)
/* the rde will withdraw the connected route for us */
+ while ((nbr = TAILQ_FIRST(&ei->nbr_list)) != NULL)
+ nbr_del(nbr);
+
if (ei->passive)
return;
@@ -419,9 +420,6 @@ eigrp_if_reset(struct eigrp_iface *ei)
}
eigrp_if_stop_hello_timer(ei);
-
- while ((nbr = TAILQ_FIRST(&ei->nbr_list)) != NULL)
- nbr_del(nbr);
}
struct eigrp_iface *