From 1565d76bd6ff2d1064c3d30e947dc70613417853 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Tue, 3 Dec 2013 22:00:33 +0100 Subject: Fix prefix class logic --- src/odhcpd.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/odhcpd.c') 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; } -- cgit v1.2.3