diff options
author | Steven Barth <steven@midlink.org> | 2013-12-02 14:16:09 +0100 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2013-12-02 14:16:09 +0100 |
commit | d02dc222e61e2464bf850a629030c8a8b9b57ee8 (patch) | |
tree | 7f7164151f58e9b88b3e489ea30c731526f058a6 /src/odhcpd.c | |
parent | 16cee36ff3cf1895f87368709dabd3ffd5f24e4f (diff) |
Initial prefix class support
Diffstat (limited to 'src/odhcpd.c')
-rw-r--r-- | src/odhcpd.c | 9 |
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; } |