diff options
author | Renato Westphal <renato@cvs.openbsd.org> | 2015-03-21 18:29:23 +0000 |
---|---|---|
committer | Renato Westphal <renato@cvs.openbsd.org> | 2015-03-21 18:29:23 +0000 |
commit | b4756efb3fa7d3b8000f8114603e84ec3db6942d (patch) | |
tree | 0233c7d7b924481c2b3f974183493bd58e114e2d | |
parent | 929815c700635a542d149311b666d5bb8ae4242a (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.c | 13 |
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: |