delete all routes on interface down
authorFelix Fietkau <nbd@openwrt.org>
Mon, 5 Sep 2011 05:58:21 +0000 (07:58 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 5 Sep 2011 05:58:21 +0000 (07:58 +0200)
interface.c

index 2d62bb0..d8f7de3 100644 (file)
@@ -89,6 +89,7 @@ interface_event(struct interface *iface, enum interface_event ev)
 static void
 mark_interface_down(struct interface *iface)
 {
 static void
 mark_interface_down(struct interface *iface)
 {
+       interface_del_all_routes(iface);
        interface_del_ctx_addr(iface, NULL);
        device_release(&iface->main_dev);
        iface->state = IFS_DOWN;
        interface_del_ctx_addr(iface, NULL);
        device_release(&iface->main_dev);
        iface->state = IFS_DOWN;