1 Index: dnsmasq-2.66/src/dhcp.c
2 ===================================================================
3 --- dnsmasq-2.66.orig/src/dhcp.c 2013-04-17 14:52:49.000000000 +0200
4 +++ dnsmasq-2.66/src/dhcp.c 2013-04-24 08:24:20.393711625 +0200
8 int iface_index = 0, unicast_dest = 0, is_inform = 0;
9 - struct in_addr iface_addr;
10 + struct in_addr iface_addr, *addrp = NULL;
11 struct iface_param parm;
12 #ifdef HAVE_LINUX_NETWORK
13 struct arpreq arp_req;
16 ifr.ifr_addr.sa_family = AF_INET;
17 if (ioctl(daemon->dhcpfd, SIOCGIFADDR, &ifr) != -1 )
18 - iface_addr = ((struct sockaddr_in *) &ifr.ifr_addr)->sin_addr;
21 - my_syslog(MS_DHCP | LOG_WARNING, _("DHCP packet received on %s which has no address"), ifr.ifr_name);
23 + addrp = &iface_addr;
24 + iface_addr = ((struct sockaddr_in *) &ifr.ifr_addr)->sin_addr;
27 for (tmp = daemon->dhcp_except; tmp; tmp = tmp->next)
30 parm.ind = iface_index;
32 - if (!iface_check(AF_INET, (struct all_addr *)&iface_addr, ifr.ifr_name, NULL))
33 + if (!iface_check(AF_INET, (struct all_addr *)addrp, ifr.ifr_name, NULL))
35 /* If we failed to match the primary address of the interface, see if we've got a --listen-address
38 there is more than one address on the interface in the same subnet */
39 complete_context(match.addr, iface_index, match.netmask, match.broadcast, &parm);
45 + my_syslog(MS_DHCP | LOG_WARNING, _("DHCP packet received on %s which has no address"), ifr.ifr_name);
49 if (!iface_enumerate(AF_INET, &parm, complete_context))