store a pointer to the active interface as part of the device route
authorFelix Fietkau <nbd@openwrt.org>
Mon, 30 Apr 2012 17:41:48 +0000 (19:41 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 30 Apr 2012 17:41:48 +0000 (19:41 +0200)
interface-ip.c
interface-ip.h

index 349473185a8b8225d2516d2830e2fee51969974c..c0ba381e25ea78fb3181b3459b0fb54a47223ce5 100644 (file)
@@ -94,6 +94,7 @@ interface_ip_add_route(struct interface *iface, struct blob_attr *attr, bool v6)
        if ((cur = tb[ROUTE_MTU]) != NULL)
                route->mtu = blobmsg_get_u32(cur);
 
+       route->iface = ip->iface;
        vlist_add(&ip->route, &route->node, &route->flags);
        return;
 
index 887c62c65987907d935cbd423f3c1c0711e38294..28df0938dd830ed5e993eb060513cf63bc405a46 100644 (file)
@@ -36,6 +36,7 @@ struct device_addr {
 
 struct device_route {
        struct vlist_node node;
+       struct interface *iface;
 
        bool enabled;
        bool keep;