Signedness of times
Linus Sjöberg
lsjoberg at aland.net
Wed Dec 8 12:40:34 UTC 2004
I hope this is the correct list for this kind of question.
We are integrating the ISC dhcpd in a login gateway product and have
noticed that endusers with Linux firewalls are experiencing problems
logging in.
After some research we noted that it was particulary Smoothwall users
and after some digging we noted leases like:
lease 213.204.53.37 {
starts 1 2004/12/06 16:03:39;
ends 1 2004/12/06 16:03:38;
hardware ethernet 00:0c:46:17:60:07;
uid 01:00:0c:46:17:60:07;
client-hostname "Su99";
}
Note that the lease ends one second before it starts.
The probles originates from Smoothwall using 0xffffffff, ie 'infinity'
(RFC 2131, 3.3), as lease time but the dhcpd seems to parse it as a
signed integer, ie -1, and thus the lease ends before it starts.
RFC2131 and RFC2132 states that times should be represented as uint32_t,
but in the dhcpd sourcecode TIME is #defined as time_t which is a signed
int32.
Is this a known issue, and if so, are there patches available?
If not I am willing to do some more digging and prepare a patch for
submission.
Best regards,
Linus Sjöberg
Ålcom R&D
--
----Ålcom ------------------------- Network Operations Center ---------
Linus Sjöberg (0x27B1B1A1) mailto: linus at alcom.aland.fi
Ålcom phone: +358 18 23500
PB 233, Torggatan 10 fax: +358 18 14643
AX-22101 Mariehamn URL: http://www.alcom.aland.fi
More information about the dhcp-hackers
mailing list