*** From dhcp-server -- To unsubscribe, see the end of this message. ***


the following is a simple patch to initialize pointers whose values were
tested later to see whether they were properly initialized.  i had a
case that the struct host_decl *hp pointer had value 0xffffffff upon
entering the scope.

the system i am using is a standard RedHat-6.2 install with 2.2.16 linux
kernel.

the first diff is just a precaution.  the second diff actually fixes a
core dump when i used two subnet declarations and replied a dhcp request
with an IP unknown to the first subnet (where the DNS server and router
are loacted).


diff -rC5 dhcp-3.0b1pl14/server/confpars.c dhcp-dii/server/confpars.c
*** dhcp-3.0b1pl14/server/confpars.c    Wed Feb  2 09:01:19 2000
--- dhcp-dii/server/confpars.c  Wed Jun 28 00:30:16 2000
***************
*** 1745,1755 ****
                        return;
                }
        }
  
        if (!pool) {
!               struct pool *last;
                /* If we're permitting dynamic bootp for this range,
                   then look for a pool with an empty prohibit list and
                   a permit list with one entry that permits all clients */
                for (pool = share -> pools; pool; pool = pool -> next) {
                        if ((!dynamic && !pool -> permit_list && 
--- 1745,1755 ----
                        return;
                }
        }
  
        if (!pool) {
!               struct pool *last=0;
                /* If we're permitting dynamic bootp for this range,
                   then look for a pool with an empty prohibit list and
                   a permit list with one entry that permits all clients */
                for (pool = share -> pools; pool; pool = pool -> next) {
                        if ((!dynamic && !pool -> permit_list && 
diff -rC5 dhcp-3.0b1pl14/server/dhcp.c dhcp-dii/server/dhcp.c
*** dhcp-3.0b1pl14/server/dhcp.c        Sat Jun 24 00:59:31 2000
--- dhcp-dii/server/dhcp.c      Wed Jun 28 00:29:09 2000
***************
*** 983,993 ****
                }
        }
  
        /* Try to find a matching host declaration for this lease. */
        if (!lease -> host) {
!               c
  
                /* Try to find a host_decl that matches the client
                   identifier or hardware address on the packet, and
                   has no fixed IP address.   If there is one, hang
                   it off the lease so that its option definitions
--- 983,993 ----
                }
        }
  
        /* Try to find a matching host declaration for this lease. */
        if (!lease -> host) {
!               struct host_decl *hp=0;
  
                /* Try to find a host_decl that matches the client
                   identifier or hardware address on the packet, and
                   has no fixed IP address.   If there is one, hang
                   it off the lease so that its option definitions


-----------------------------------------------------------------------
List Archives : http://www.isc.org/ml-archives/dhcp-server/
Unsubscribe   : http://www.isc.org/dhcp-lists.html    
-or-          : mailto:[EMAIL PROTECTED]?Subject=unsubscribe  
-----------------------------------------------------------------------

Reply via email to