summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRenato Westphal <renato@cvs.openbsd.org>2015-03-21 18:29:23 +0000
committerRenato Westphal <renato@cvs.openbsd.org>2015-03-21 18:29:23 +0000
commitb4756efb3fa7d3b8000f8114603e84ec3db6942d (patch)
tree0233c7d7b924481c2b3f974183493bd58e114e2d
parent929815c700635a542d149311b666d5bb8ae4242a (diff)
Don't try to send address withdraws to neighbors that are unreachable
after an address removal in the system.
-rw-r--r--usr.sbin/ldpd/ldpe.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/usr.sbin/ldpd/ldpe.c b/usr.sbin/ldpd/ldpe.c
index 84d61d2cf63..e97ee27fa7a 100644
--- a/usr.sbin/ldpd/ldpe.c
+++ b/usr.sbin/ldpd/ldpe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldpe.c,v 1.28 2015/03/21 17:33:10 renato Exp $ */
+/* $OpenBSD: ldpe.c,v 1.29 2015/03/21 18:29:22 renato Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -414,17 +414,18 @@ ldpe_dispatch_main(int fd, short event, void *bula)
break;
LIST_REMOVE(if_addr, global_entry);
+ iface = if_lookup(kaddr->ifindex);
+ if (iface) {
+ LIST_REMOVE(if_addr, iface_entry);
+ if_fsm(iface, IF_EVT_DELADDR);
+ }
+
RB_FOREACH(nbr, nbr_id_head, &nbrs_by_id) {
if (nbr->state != NBR_STA_OPER)
continue;
send_address_withdraw(nbr, if_addr);
}
- iface = if_lookup(kaddr->ifindex);
- if (iface) {
- LIST_REMOVE(if_addr, iface_entry);
- if_fsm(iface, IF_EVT_DELADDR);
- }
free(if_addr);
break;
case IMSG_RECONF_CONF: