IPv6: Export delegation setting via ubus
authorSteven Barth <steven@midlink.org>
Wed, 30 Oct 2013 12:18:24 +0000 (13:18 +0100)
committerSteven Barth <steven@midlink.org>
Wed, 30 Oct 2013 12:18:24 +0000 (13:18 +0100)
This allows foreign prefix delegators to quickly distinguish between
managed and unmanaged prefixes.

Signed-off-by: Steven Barth <steven@midlink.org>
ubus.c

diff --git a/ubus.c b/ubus.c
index b75eaeca7cf52c0ba7c82ec6a235516eedac61bf..90636804bb6d61fb45649ddce18bf1114569d03c 100644 (file)
--- a/ubus.c
+++ b/ubus.c
@@ -656,6 +656,7 @@ netifd_dump_status(struct interface *iface)
 
        if (iface->state == IFS_UP) {
                blobmsg_add_u32(&b, "metric", iface->metric);
+               blobmsg_add_u8(&b, "delegation", !iface->proto_ip.no_delegation);
                a = blobmsg_open_array(&b, "ipv4-address");
                interface_ip_dump_address_list(&iface->config_ip, false, true);
                interface_ip_dump_address_list(&iface->proto_ip, false, true);