summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--interface-ip.c2
-rw-r--r--interface-ip.h3
-rw-r--r--proto.c2
-rw-r--r--system-dummy.c6
-rw-r--r--system-linux.c3
5 files changed, 4 insertions, 12 deletions
diff --git a/interface-ip.c b/interface-ip.c
index 51612fa..3204cd9 100644
--- a/interface-ip.c
+++ b/interface-ip.c
@@ -83,8 +83,6 @@ interface_ip_add_route(struct interface *iface, struct blob_attr *attr, bool v6)
DPRINTF("Failed to parse route gateway: %s\n", (char *) blobmsg_data(cur));
goto error;
}
- } else {
- route->flags |= DEVADDR_DEVICE;
}
if ((cur = tb[ROUTE_METRIC]) != NULL)
diff --git a/interface-ip.h b/interface-ip.h
index e983a84..0ce94df 100644
--- a/interface-ip.h
+++ b/interface-ip.h
@@ -9,9 +9,6 @@ enum device_addr_flags {
DEVADDR_INET6 = (1 << 0),
DEVADDR_FAMILY = DEVADDR_INET4 | DEVADDR_INET6,
- /* device route (no gateway) */
- DEVADDR_DEVICE = (1 << 1),
-
/* externally added address */
DEVADDR_EXTERNAL = (1 << 2),
};
diff --git a/proto.c b/proto.c
index 56870b1..246d78e 100644
--- a/proto.c
+++ b/proto.c
@@ -183,7 +183,7 @@ parse_gateway_option(struct interface *iface, struct blob_attr *attr, bool v6)
}
route->mask = 0;
- route->flags = DEVADDR_DEVICE | (v6 ? DEVADDR_INET6 : DEVADDR_INET4);
+ route->flags = (v6 ? DEVADDR_INET6 : DEVADDR_INET4);
vlist_add(&iface->proto_ip.route, &route->node, &route->mask);
return true;
diff --git a/system-dummy.c b/system-dummy.c
index 401a1a9..b3aefbe 100644
--- a/system-dummy.c
+++ b/system-dummy.c
@@ -156,8 +156,7 @@ int system_add_route(struct device *dev, struct device_route *route)
sprintf(gw, " gw %d.%d.%d.%d",
a2[0], a2[1], a2[2], a2[3]);
- if (route->flags & DEVADDR_DEVICE)
- sprintf(devstr, " dev %s", dev->ifname);
+ sprintf(devstr, " dev %s", dev->ifname);
if (route->metric > 0)
sprintf(devstr, " metric %d", route->metric);
@@ -185,8 +184,7 @@ int system_del_route(struct device *dev, struct device_route *route)
sprintf(gw, " gw %d.%d.%d.%d",
a2[0], a2[1], a2[2], a2[3]);
- if (route->flags & DEVADDR_DEVICE)
- sprintf(devstr, " dev %s", dev->ifname);
+ sprintf(devstr, " dev %s", dev->ifname);
D(SYSTEM, "route del %s%s%s\n", addr, gw, devstr);
return 0;
diff --git a/system-linux.c b/system-linux.c
index 0e6ce5a..66799e9 100644
--- a/system-linux.c
+++ b/system-linux.c
@@ -901,8 +901,7 @@ static int system_rt(struct device *dev, struct device_route *route, int cmd)
if (have_gw)
nla_put(msg, RTA_GATEWAY, alen, &route->nexthop);
- if (route->flags & DEVADDR_DEVICE)
- nla_put_u32(msg, RTA_OIF, ifindex);
+ nla_put_u32(msg, RTA_OIF, ifindex);
return system_rtnl_call(msg);
}