projects
/
project
/
netifd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
memset the on-stack device route when clearing local subnet routes
[project/netifd.git]
/
ubus.c
diff --git
a/ubus.c
b/ubus.c
index
b936b9a
..
ee4b031
100644
(file)
--- a/
ubus.c
+++ b/
ubus.c
@@
-432,6
+432,12
@@
interface_ip_dump_route_list(struct interface_ip_settings *ip)
inet_ntop(af, &route->nexthop, buf, buflen);
blobmsg_add_string_buffer(&b);
inet_ntop(af, &route->nexthop, buf, buflen);
blobmsg_add_string_buffer(&b);
+ if (route->flags & DEVROUTE_MTU)
+ blobmsg_add_u32(&b, "mtu", route->mtu);
+
+ if (route->flags & DEVROUTE_METRIC)
+ blobmsg_add_u32(&b, "metric", route->metric);
+
blobmsg_add_u8(&b, "enabled", route->enabled);
blobmsg_close_table(&b, r);
blobmsg_add_u8(&b, "enabled", route->enabled);
blobmsg_close_table(&b, r);
@@
-490,10
+496,12
@@
netifd_handle_status(struct ubus_context *ctx, struct ubus_object *obj,
blobmsg_add_string(&b, "proto", iface->proto_handler->name);
dev = iface->main_dev.dev;
blobmsg_add_string(&b, "proto", iface->proto_handler->name);
dev = iface->main_dev.dev;
- if (dev && !(iface->proto_handler->flags & PROTO_FLAG_NODEV))
+ if (dev && !dev->hidden &&
+ !(iface->proto_handler->flags & PROTO_FLAG_NODEV))
blobmsg_add_string(&b, "device", dev->ifname);
if (iface->state == IFS_UP) {
blobmsg_add_string(&b, "device", dev->ifname);
if (iface->state == IFS_UP) {
+ blobmsg_add_u32(&b, "metric", iface->metric);
a = blobmsg_open_array(&b, "ipv4-address");
interface_ip_dump_address_list(&iface->config_ip, false);
interface_ip_dump_address_list(&iface->proto_ip, false);
a = blobmsg_open_array(&b, "ipv4-address");
interface_ip_dump_address_list(&iface->config_ip, false);
interface_ip_dump_address_list(&iface->proto_ip, false);