From e6e1fd184841552bd343ef2b92378c1d84cb79f4 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Tue, 19 Nov 2013 12:17:03 +0100 Subject: [PATCH] netifd: Export ip4table/ip6table via UBUS Export ip4table/ip6table parameters via UBUS to facilitate route inspection and usage by other applications Signed-off-by: Hans Dedecker --- ubus.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ubus.c b/ubus.c index e563e1f..794444e 100644 --- a/ubus.c +++ b/ubus.c @@ -659,6 +659,10 @@ netifd_dump_status(struct interface *iface) blobmsg_add_string(&b, "device", dev->ifname); if (iface->state == IFS_UP) { + if (iface->ip4table) + blobmsg_add_u32(&b, "ip4table", iface->ip4table); + if (iface->ip6table) + blobmsg_add_u32(&b, "ip6table", iface->ip6table); blobmsg_add_u32(&b, "metric", iface->metric); blobmsg_add_u8(&b, "delegation", !iface->proto_ip.no_delegation); a = blobmsg_open_array(&b, "ipv4-address"); -- 2.30.2