From b4756efb3fa7d3b8000f8114603e84ec3db6942d Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Sat, 21 Mar 2015 18:29:23 +0000 Subject: Don't try to send address withdraws to neighbors that are unreachable after an address removal in the system. --- usr.sbin/ldpd/ldpe.c | 13 +++++++------ 1 file 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 @@ -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: -- cgit v1.2.3