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 b7c33b7..6b95a6d 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;
 }