int main()
{
openlog("odhcpd", LOG_PERROR | LOG_PID, LOG_DAEMON);
+ setlogmask(LOG_UPTO(LOG_INFO));
uloop_init();
if (getuid() != 0) {
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;
}
int *hlim = NULL;
struct in6_pktinfo *pktinfo;
struct in_pktinfo *pkt4info;
- for (struct cmsghdr *ch = CMSG_FIRSTHDR(&msg); ch != NULL &&
- destiface == 0; ch = CMSG_NXTHDR(&msg, ch)) {
+ for (struct cmsghdr *ch = CMSG_FIRSTHDR(&msg); ch != NULL; ch = CMSG_NXTHDR(&msg, ch)) {
if (ch->cmsg_level == IPPROTO_IPV6 &&
ch->cmsg_type == IPV6_PKTINFO) {
pktinfo = (struct in6_pktinfo*)CMSG_DATA(ch);