summaryrefslogtreecommitdiffhomepage
path: root/src/odhcpd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/odhcpd.c')
-rw-r--r--src/odhcpd.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/odhcpd.c b/src/odhcpd.c
index 2859907..5a800b7 100644
--- a/src/odhcpd.c
+++ b/src/odhcpd.c
@@ -240,6 +240,15 @@ ssize_t odhcpd_get_interface_addresses(int ifindex,
if (ifa->ifa_flags & IFA_F_DEPRECATED)
addrs[ret].preferred = 0;
+ addrs[ret].has_class = false;
+ addrs[ret].class = 0;
+#ifdef WITH_UBUS
+ struct interface *iface = odhcpd_get_interface_by_index(ifindex);
+ if (iface) {
+ addrs[ret].has_class = true;
+ addrs[ret].class = ubus_get_class(iface->ifname, &addrs[ret].addr);
+ }
+#endif
++ret;
}