Browse Source

correct the DHCP lease value

It was set as ~0UL, which is 64 bits. The spec
says it is 32 bits. This corrects a clang warning.
gcc never said anything.

This does NOT fix the ipconfig failure when
it's compiled with clang, however.

ipconfig reliably fails when compiled with clang, and
occasionaly fails when compiled with gcc. I suspect
it's another memory ordering issue, but who knows.

kenc made it easier to be sloppy with shared memory,
so there are little landmines waiting for us all
over the source code.

Signed-off-by: Ronald G. Minnich <>
Ronald G. Minnich 4 years ago
1 changed files with 2 additions and 2 deletions
  1. 2 2

+ 2 - 2

@@ -137,8 +137,8 @@ enum
 /*	OP9dns=			135,*/	/* dns servers */
-/* a lease that never expires */
-#define Lforever	~0UL
+/* a lease that never expires. DHCP specifies that it is 32 bits of seconds. */
+#define Lforever	((uint32_t)~0)
 /* dhcp states */
 enum {