summaryrefslogtreecommitdiffhomepage
path: root/ubus.c
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2017-01-19 15:59:54 +0100
committerFelix Fietkau <nbd@nbd.name>2017-01-25 09:35:27 +0100
commit650758b16e5185505a3fbc1307949340af70b611 (patch)
treeb8fdadfb813f45d8f96186c8f71ba61edba14e64 /ubus.c
parenta057f6e48f383c7e81cb22aa806216878d87947b (diff)
interface-ip: route proto config support (FS#170)
Route proto support is usefull when using route distribution via a routing daemon. The route proto parameter can be specified via the route proto uci config parameter, it can hold a numerical value or the string values unspec, kernel, boot, static or a string present in /etc/iproute2/rt_protos. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'ubus.c')
-rw-r--r--ubus.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ubus.c b/ubus.c
index 29924c1..0123b17 100644
--- a/ubus.c
+++ b/ubus.c
@@ -486,6 +486,9 @@ interface_ip_dump_route_list(struct interface_ip_settings *ip, bool enabled)
if (route->flags & DEVROUTE_TYPE)
blobmsg_add_u32(&b, "type", route->type);
+ if (route->flags & DEVROUTE_PROTO)
+ blobmsg_add_u32(&b, "proto", route->proto);
+
if (route->flags & DEVROUTE_MTU)
blobmsg_add_u32(&b, "mtu", route->mtu);