-/* $OpenBSD: interface.c,v 1.15 2019/06/28 13:32:50 deraadt Exp $ */
+/* $OpenBSD: interface.c,v 1.16 2021/01/19 10:09:59 claudio Exp $ */
/*
* Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
log_debug("if_del: interface %s", iface->name);
- /* revert the demotion when the interface is deleted */
- if (iface->state == IF_STA_DOWN)
- ripe_demote_iface(iface, 1);
-
/* clear lists etc */
while ((nbr = LIST_FIRST(&iface->nbr_list)) != NULL)
nbr_del(nbr);
-/* $OpenBSD: ripe.c,v 1.27 2021/01/19 10:02:22 claudio Exp $ */
+/* $OpenBSD: ripe.c,v 1.28 2021/01/19 10:09:59 claudio Exp $ */
/*
* Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
}
while ((iface = LIST_FIRST(&oeconf->iface_list)) != NULL) {
LIST_REMOVE(iface, entry);
+
+ /* revert the demotion when the interface is deleted */
+ if (iface->state == IF_STA_DOWN)
+ ripe_demote_iface(iface, 1);
+
if_del(iface);
}
{
struct demote_msg dmsg;
- if (ripd_process != PROC_RIP_ENGINE ||
- iface->demote_group[0] == '\0')
+ if (iface->demote_group[0] == '\0')
return;
bzero(&dmsg, sizeof(dmsg));