dnsmasq: fix instances in dhcp_add()
[openwrt/openwrt.git] / package / network / services / dnsmasq / patches / 100-fix-dhcp-no-address-warning.patch
index f5b5ca04ec6021bdbe09c9b8a289297935bd00f5..5fc62ffab36d2a31ea3d5a0088ff2d3753f1007d 100644 (file)
@@ -1,15 +1,15 @@
 --- a/src/dhcp.c
 +++ b/src/dhcp.c
-@@ -146,7 +146,7 @@ void dhcp_packet(time_t now, int pxe_fd)
-   struct iovec iov;
+@@ -147,7 +147,7 @@ void dhcp_packet(time_t now, int pxe_fd)
    ssize_t sz; 
    int iface_index = 0, unicast_dest = 0, is_inform = 0;
+   int rcvd_iface_index;
 -  struct in_addr iface_addr;
 +  struct in_addr iface_addr, *addrp = NULL;
    struct iface_param parm;
  #ifdef HAVE_LINUX_NETWORK
    struct arpreq arp_req;
-@@ -275,11 +275,9 @@ void dhcp_packet(time_t now, int pxe_fd)
+@@ -277,11 +277,9 @@ void dhcp_packet(time_t now, int pxe_fd)
      {
        ifr.ifr_addr.sa_family = AF_INET;
        if (ioctl(daemon->dhcpfd, SIOCGIFADDR, &ifr) != -1 )
@@ -23,7 +23,7 @@
        }
        
        for (tmp = daemon->dhcp_except; tmp; tmp = tmp->next)
-@@ -298,7 +296,7 @@ void dhcp_packet(time_t now, int pxe_fd)
+@@ -300,7 +298,7 @@ void dhcp_packet(time_t now, int pxe_fd)
        parm.relay_local.s_addr = 0;
        parm.ind = iface_index;
        
@@ -32,7 +32,7 @@
        {
          /* If we failed to match the primary address of the interface, see if we've got a --listen-address
             for a secondary */
-@@ -318,6 +316,12 @@ void dhcp_packet(time_t now, int pxe_fd)
+@@ -320,6 +318,12 @@ void dhcp_packet(time_t now, int pxe_fd)
          complete_context(match.addr, iface_index, NULL, match.netmask, match.broadcast, &parm);
        }