dhcpv6: add setting to choose IA_NA, IA_PD or both
[oweals/odhcpd.git] / src / ubus.c
index 5be6bbef41f60e44ab75ec9bfaf39e1637e43978..816ca2a538c902291b84b044f6eabdd9039d2671 100644 (file)
@@ -4,6 +4,8 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
+#include <libubox/utils.h>
+
 #include "odhcpd.h"
 #include "dhcpv6.h"
 #include "dhcpv4.h"
@@ -53,6 +55,9 @@ static int handle_dhcpv4_leases(struct ubus_context *ctx, _unused struct ubus_ob
 
                        if (c->flags & OAF_STATIC)
                                blobmsg_add_string(&b, NULL, "static");
+
+                       if (c->flags & OAF_BROKEN_HOSTNAME)
+                               blobmsg_add_string(&b, NULL, "broken-hostname");
                        blobmsg_close_array(&b, m);
 
                        buf = blobmsg_alloc_string_buffer(&b, "address", INET_ADDRSTRLEN);