diff options
Diffstat (limited to 'src/ubus.c')
-rw-r--r-- | src/ubus.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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"); |