diff -rcN dhcp-1.4.0p6/client/dhcpc.c dhcp-1.4.0p7/client/dhcpc.c
*** dhcp-1.4.0p6/client/dhcpc.c	Fri Jan  1 22:20:08 1999
--- dhcp-1.4.0p7/client/dhcpc.c	Thu Mar 25 19:59:26 1999
***************
*** 1859,1864 ****
--- 1859,1868 ----
    reqspec.reqlist.list[reqspec.reqlist.len++] = SUBNET_MASK;
    reqspec.reqlist.list[reqspec.reqlist.len++] = ROUTER;
    reqspec.reqlist.list[reqspec.reqlist.len++] = BRDCAST_ADDR;
+ #ifdef DNS
+   reqspec.reqlist.list[reqspec.reqlist.len++] = DNS_SERVER;
+   reqspec.reqlist.list[reqspec.reqlist.len++] = DNS_DOMAIN;
+ #endif
    
    n = dhcp_client(&ifinfo);
    unlink(pid_filename);
diff -rcN dhcp-1.4.0p6/client/dhcpc_subr.c dhcp-1.4.0p7/client/dhcpc_subr.c
*** dhcp-1.4.0p6/client/dhcpc_subr.c	Fri Jan  1 23:21:08 1999
--- dhcp-1.4.0p7/client/dhcpc_subr.c	Thu May 13 10:28:29 1999
***************
*** 542,548 ****
    }
    if (parameter->dhcp_t2 == 0) {
      double tmp = (double) parameter->lease_duration * 0.875;
!     parameter->dhcp_t2 = (unsigned short) tmp;
      SETBIT(parameter->got_option, DHCP_T2);
    }
  
--- 542,548 ----
    }
    if (parameter->dhcp_t2 == 0) {
      double tmp = (double) parameter->lease_duration * 0.875;
!     parameter->dhcp_t2 = (unsigned Long) tmp;
      SETBIT(parameter->got_option, DHCP_T2);
    }
  
***************
*** 2537,2543 ****
    struct msghdr msg;
    struct iovec bufvec[1];
    int bufsize = DFLTDHCPLEN;
! #if defined(__bsdi__) || defined(__FreeBSD__)
    int on;
  #endif
  
--- 2537,2543 ----
    struct msghdr msg;
    struct iovec bufvec[1];
    int bufsize = DFLTDHCPLEN;
! #ifndef sun
    int on;
  #endif
  
***************
*** 2598,2609 ****
--- 2598,2611 ----
        return(-1);
      }
  
+ #ifndef sun
      on = 1;
      if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEPORT, &on, sizeof(on)) < 0) {
        close(sockfd);
        sockfd = -1;
        return(-1);
      }
+ #endif
    }
  
    bzero(&dst, sizeof(dst));
diff -rcN dhcp-1.4.0p6/client/flushroute.c dhcp-1.4.0p7/client/flushroute.c
*** dhcp-1.4.0p6/client/flushroute.c	Fri Jan  1 22:34:12 1999
--- dhcp-1.4.0p7/client/flushroute.c	Mon Mar 29 12:32:49 1999
***************
*** 103,109 ****
    struct sockaddr_dl *sdl;
    struct ifreq *ifr;
    int n, len;
!   int size = 1024;
  
    if ((s = socket(PF_INET, SOCK_DGRAM, 0)) < 0) {
      syslog(LOG_ERR, "socket: %m");
--- 103,109 ----
    struct sockaddr_dl *sdl;
    struct ifreq *ifr;
    int n, len;
!   int size = 8192;
  
    if ((s = socket(PF_INET, SOCK_DGRAM, 0)) < 0) {
      syslog(LOG_ERR, "socket: %m");
diff -rcN dhcp-1.4.0p6/server/common_subr.h dhcp-1.4.0p7/server/common_subr.h
*** dhcp-1.4.0p6/server/common_subr.h	Wed Mar  3 18:57:44 1999
--- dhcp-1.4.0p7/server/common_subr.h	Thu May 13 10:29:11 1999
***************
*** 37,43 ****
   * WIDE project has the rights to redistribute these changes.
   */
  
! #define WIDEDHCP_VERS    "1.4.0p6"
  
  struct ps_udph {              /* pseudo udp header for checksum */
    struct in_addr srcip,
--- 37,43 ----
   * WIDE project has the rights to redistribute these changes.
   */
  
! #define WIDEDHCP_VERS    "1.4.0p7"
  
  struct ps_udph {              /* pseudo udp header for checksum */
    struct in_addr srcip,
diff -rcN dhcp-1.4.0p6/server/database.c dhcp-1.4.0p7/server/database.c
*** dhcp-1.4.0p6/server/database.c	Fri Jan  1 22:35:33 1999
--- dhcp-1.4.0p7/server/database.c	Mon Sep 27 17:42:29 1999
***************
*** 408,413 ****
--- 408,414 ----
  
    if (bindlist == NULL) {
      /* first time */
+     nbind == 0;
      if ((bindptr =
  	 (struct hash_member *) calloc(1, sizeof(struct hash_member))) == NULL) {
        syslog(LOG_WARNING, "calloc error in add_bind()");
***************
*** 1132,1138 ****
      return(-1);
  
    /*
!    * get subnet
     */
    if (rp->subnet_mask != NULL) {
      binding->cid.subnet.s_addr = rp->ip_addr->s_addr & rp->subnet_mask->s_addr;  } else {
--- 1133,1139 ----
      return(-1);
  
    /*
!    * determine temporary subnet.  It may change later.
     */
    if (rp->subnet_mask != NULL) {
      binding->cid.subnet.s_addr = rp->ip_addr->s_addr & rp->subnet_mask->s_addr;  } else {
***************
*** 1991,1996 ****
--- 1992,2009 ----
        syslog(LOG_ERR,
  	     "hash_ins() failed in read_addrpool_db(): %s", buffer);
        exit(1);
+     }
+ 
+     /* subnet mask may have been changed in proc_clid(), so fix it */
+     if (rp->binding != NULL &&
+ 	(rp->binding->cid.subnet.s_addr !=
+ 	 rp->ip_addr->s_addr & rp->subnet_mask->s_addr)) {
+       rp->binding->cid.subnet.s_addr =
+ 	rp->ip_addr->s_addr & rp->subnet_mask->s_addr;
+       hash_del(&cidhashtable, rp->binding->cid.id, rp->binding->cid.idlen,
+ 	       bindcidcmp, &rp->binding->cid, NULL);
+       hash_ins(&cidhashtable, rp->binding->cid.id, rp->binding->cid.idlen,
+ 	       bindcidcmp, &rp->binding->cid, rp->binding);
      }
  
      if (isset(rp->valid, S_IP_ADDR)) {
