[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dhcp patch



The following patch allows dhclient to work on cable-modem systems
maintained by AT&T Broadband in Minneapolis and Saint Paul.  Without
the patch, a DHCPOFFER is never received from their systems.  A 
friend suggested the fix to me after analyzing the problem on his
NetBSD system.  AT&T changed their setup here around Jun 19; before
that the ttl of 16 worked fine.

Thanks,

-Shawn


? dhcp.patch
Index: usr.sbin/dhcp/common/packet.c
===================================================================
RCS file: /cvs/src/usr.sbin/dhcp/common/packet.c,v
retrieving revision 1.4
diff -u -r1.4 packet.c
--- usr.sbin/dhcp/common/packet.c	24 Jun 2001 06:05:07 -0000	1.4
+++ usr.sbin/dhcp/common/packet.c	1 Aug 2002 14:55:05 -0000
@@ -146,7 +146,7 @@
 	ip.ip_len = htons(sizeof(ip) + sizeof(udp) + len);
 	ip.ip_id = 0;
 	ip.ip_off = 0;
-	ip.ip_ttl = 16;
+	ip.ip_ttl = 127;
 	ip.ip_p = IPPROTO_UDP;
 	ip.ip_sum = 0;
 	ip.ip_src.s_addr = from;

--
Shawn T. Amundson                       amundson@eventloop.com	
Research and Development                http://www.eventloop.com/
EventLoop, Inc.                         (651) 999-0130

"The assumption that the universe looks the same in every
 direction is clearly not true in reality." - Stephen Hawking