summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-03-09 10:57:13 +0100
committerFelix Fietkau <nbd@openwrt.org>2012-03-09 10:57:13 +0100
commit680e846cd931223df74cdc12c8b6ce08f233a4f4 (patch)
treefaeb83f268fc0787715e0114115102e21e2ef0ed
parent4b8e81a146de42ba9608d7a7aabba3e1be03c585 (diff)
system-dummy: add route metric information
-rw-r--r--system-dummy.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/system-dummy.c b/system-dummy.c
index f2e3aed..71dad0e 100644
--- a/system-dummy.c
+++ b/system-dummy.c
@@ -159,6 +159,9 @@ int system_add_route(struct device *dev, struct device_route *route)
if (route->flags & DEVADDR_DEVICE)
sprintf(devstr, " dev %s", dev->ifname);
+ if (route->metric > 0)
+ sprintf(devstr, " metric %d", route->metric);
+
D(SYSTEM, "route add %s%s%s\n", addr, gw, devstr);
return 0;
}