release devices only after flushing ip state
authorFelix Fietkau <nbd@openwrt.org>
Sat, 14 Apr 2012 15:11:12 +0000 (17:11 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 14 Apr 2012 15:11:12 +0000 (17:11 +0200)
interface.c

index b7c33b7dfaf5a207bb23aec897a9674186538066..6b95a6db39ff66a5cae465bc4a8d8cd168d2ed09 100644 (file)
@@ -142,9 +142,9 @@ mark_interface_down(struct interface *iface)
 {
        if (iface->state == IFS_UP)
                interface_event(iface, IFEV_DOWN);
-       interface_flush_state(iface);
        interface_ip_flush(&iface->config_ip);
        interface_ip_flush(&iface->proto_ip);
+       interface_flush_state(iface);
        iface->state = IFS_DOWN;
 }