static void
mark_interface_down(struct interface *iface)
{
+ if (iface->state == IFS_UP)
+ interface_event(iface, IFEV_DOWN);
interface_flush_state(iface);
iface->state = IFS_DOWN;
}
iface->state == IFS_TEARDOWN)
return;
+ if (iface->state == IFS_UP)
+ interface_event(iface, IFEV_DOWN);
iface->state = IFS_TEARDOWN;
- interface_event(iface, IFEV_DOWN);
interface_proto_event(iface->proto, PROTO_CMD_TEARDOWN, force);
if (force)
interface_flush_state(iface);
return;
netifd_log_message(L_NOTICE, "Interface '%s' has lost the connection\n", iface->name);
+ if (iface->state == IFS_UP)
+ interface_event(iface, IFEV_DOWN);
iface->state = IFS_SETUP;
- interface_event(iface, IFEV_DOWN);
break;
}
}