diff -ur dhcpcd-1.3.22-pl3/buildmsg.c dhcpcd-1.3.22-pl3-ntl/buildmsg.c --- dhcpcd-1.3.22-pl3/buildmsg.c Sat Jan 5 20:15:56 2002 +++ dhcpcd-1.3.22-pl3-ntl/buildmsg.c Thu Dec 5 18:07:51 2002 @@ -243,6 +243,7 @@ *p++ = 2; memcpy(p,&dhcpMsgSize,2); p += 2; +#if 0 if ( DhcpOptions.val[dhcpIPaddrLeaseTime] ) { *p++ = dhcpIPaddrLeaseTime; @@ -250,6 +251,7 @@ memcpy(p,DhcpOptions.val[dhcpIPaddrLeaseTime],4); p += 4; } +#endif *p++ = dhcpParamRequest; *p++ = 14; *p++ = subnetMask; diff -ur dhcpcd-1.3.22-pl3/client.c dhcpcd-1.3.22-pl3-ntl/client.c --- dhcpcd-1.3.22-pl3/client.c Sun Sep 29 16:52:13 2002 +++ dhcpcd-1.3.22-pl3-ntl/client.c Sat Dec 7 13:49:03 2002 @@ -144,6 +144,15 @@ #endif register u_char *p = DhcpMsgRecv->options+4; unsigned char *end = DhcpMsgRecv->options+sizeof(DhcpMsgRecv->options); + + /* Force T1 and T2 to 0: either new values will be in message, or they + will need to be recalculated from lease time */ + if ( DhcpOptions.val[dhcpT1value] && DhcpOptions.len[dhcpT1value] == 4 ) + *(unsigned int *)DhcpOptions.val[dhcpT1value] = 0; + + if ( DhcpOptions.val[dhcpT2value] && DhcpOptions.len[dhcpT2value] == 4 ) + *(unsigned int *)DhcpOptions.val[dhcpT2value] = 0; + while ( p < end ) switch ( *p ) { @@ -339,6 +348,13 @@ if ( DebugFlag ) syslog(LOG_DEBUG,"dhcpIPaddrLeaseTime=0 in DHCP server response. Assuming %u sec\n",LeaseTime); } + else + if ( DebugFlag ) + { + unsigned t = ntohl(*(unsigned int *)DhcpOptions.val[dhcpIPaddrLeaseTime]); + syslog(LOG_DEBUG,"dhcpIPaddrLeaseTime=%u in DHCP server response.\n",t); + } + } else /* did not get dhcpIPaddrLeaseTime */ {