From 1418ef786f275b8458462ee3494573524ca0042c Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Fri, 17 Jan 2014 00:39:40 +0100 Subject: Add indicator-flags to ubus and hotplug update-events --- ubus.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'ubus.c') 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) -- cgit v1.2.3