summaryrefslogtreecommitdiffhomepage
path: root/src/odhcpd.c
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2013-12-03 22:00:33 +0100
committerSteven Barth <steven@midlink.org>2013-12-03 22:00:33 +0100
commit1565d76bd6ff2d1064c3d30e947dc70613417853 (patch)
treec0dca5b2447e09124a0b93cfa5e472f74f9b94ba /src/odhcpd.c
parentd02dc222e61e2464bf850a629030c8a8b9b57ee8 (diff)
Fix prefix class logic
Diffstat (limited to 'src/odhcpd.c')
-rw-r--r--src/odhcpd.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/odhcpd.c b/src/odhcpd.c
index 5a800b7..d6ca298 100644
--- a/src/odhcpd.c
+++ b/src/odhcpd.c
@@ -244,10 +244,9 @@ ssize_t odhcpd_get_interface_addresses(int ifindex,
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);
- }
+ if (iface)
+ addrs[ret].has_class = ubus_get_class(iface->ifname,
+ &addrs[ret].addr, &addrs[ret].class);
#endif
++ret;
}