summaryrefslogtreecommitdiffhomepage
path: root/ubus.c
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2014-01-17 00:39:40 +0100
committerSteven Barth <steven@midlink.org>2014-01-17 00:39:40 +0100
commit1418ef786f275b8458462ee3494573524ca0042c (patch)
treeb8f54642f54ad2b6d0bbda84290281bf53a0d677 /ubus.c
parent7d79d0a8aa5a5b4c1ed987af119356438d98fe7b (diff)
Add indicator-flags to ubus and hotplug update-events
Diffstat (limited to 'ubus.c')
-rw-r--r--ubus.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/ubus.c b/ubus.c
index 399d46b..22b75e4 100644
--- a/ubus.c
+++ b/ubus.c
@@ -662,6 +662,21 @@ netifd_dump_status(struct interface *iface)
blobmsg_add_string(&b, "device", dev->ifname);
if (iface->state == IFS_UP) {
+ if (iface->updated) {
+ a = blobmsg_open_array(&b, "updated");
+
+ if (iface->updated & IUF_ADDRESS)
+ blobmsg_add_string(&b, NULL, "addresses");
+ if (iface->updated & IUF_ROUTE)
+ blobmsg_add_string(&b, NULL, "routes");
+ if (iface->updated & IUF_PREFIX)
+ blobmsg_add_string(&b, NULL, "prefixes");
+ if (iface->updated & IUF_DATA)
+ blobmsg_add_string(&b, NULL, "data");
+
+ blobmsg_close_array(&b, a);
+ }
+
if (iface->ip4table)
blobmsg_add_u32(&b, "ip4table", iface->ip4table);
if (iface->ip6table)