summaryrefslogtreecommitdiffhomepage
path: root/src/ubus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ubus.c')
-rw-r--r--src/ubus.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ubus.c b/src/ubus.c
index b2e48cf..1bb8237 100644
--- a/src/ubus.c
+++ b/src/ubus.c
@@ -49,6 +49,16 @@ static int handle_dhcpv4_leases(struct ubus_context *ctx, _unused struct ubus_ob
blobmsg_add_string(&b, "hostname", (c->hostname) ? c->hostname : "");
blobmsg_add_u8(&b, "accept-reconf-nonce", c->accept_fr_nonce);
+ if (c->reqopts) {
+ int opt = 0;
+ int chars = 0;
+ buf = blobmsg_alloc_string_buffer(&b, "reqopts", strlen(c->reqopts) * 4 + 1);
+ for(; c->reqopts[opt]; opt++)
+ chars += snprintf(buf + chars, 6, "%u,", (uint8_t)c->reqopts[opt]);
+ buf[chars - 1] = '\0';
+ blobmsg_add_string_buffer(&b);
+ }
+
m = blobmsg_open_array(&b, "flags");
if (c->flags & OAF_BOUND)
blobmsg_add_string(&b, NULL, "bound");