After the call to interface_handle_config_change, the iface pointer will no
longer be valid if the interface has been deleted from the config
Signed-off-by: Felix Fietkau <nbd@nbd.name>
netifd_log_message(L_NOTICE, "Interface '%s' is now down\n", iface->name);
mark_interface_down(iface);
+ interface_write_resolv_conf(iface->jail);
if (iface->main_dev.dev)
device_release(&iface->main_dev);
if (iface->l3_dev.dev)
device_remove_user(&iface->l3_dev);
interface_handle_config_change(iface);
- break;
+ return;
case IFPEV_LINK_LOST:
if (iface->state != IFS_UP)
return;