Subject: bin/17338: TTL in DHCP is too smal
To: None <gnats-bugs@gnats.netbsd.org>
From: None <dokas@cs.umn.edu>
List: netbsd-bugs
Date: 06/20/2002 15:36:05
>Number:         17338
>Category:       bin
>Synopsis:       The TTL for DHCP requests is too smal
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 20 13:37:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Paul Dokas
>Release:        NetBSD 1.6B
>Organization:
University of Minnesota
>Environment:
System: NetBSD caligula 1.6B NetBSD 1.6B (CALIGULA) #23: Tue Jun 18 15:04:03 CDT 2002 root@caligula:/big/src/sys/arch/i386/compile/CALIGULA i386
Architecture: i386
Machine: i386
>Description:

  My ISP (AT&T broadband) recently "upgraded" their network.  As a result,
my NetBSD based firewall was a whopping 20 hops away from the DHCP server.
The TTL that's hardcoded for the DHCP Request packets is 16.  As a result,
I was completely unable to get a DHCP lease from my ISP.

  The TTL should probably be bumped up slightly.  I'd suggest 32.

>How-To-Repeat:

  Attempt to get a DHCP lease on an AT&T Cable Modem using NetBSD.

>Fix:

  The quick and dirty answer is to edit common/packet.c in the ISC DHCP
source.  Line 159 currently reads:

  ip.ip_ttl = 16;

I changed it to be:

  ip.ip_ttl = 32;

Doing this allowed me to reach the DHCP server.


  A better answer is to make this be a configurable option.  option default-ip-ttl
doesn't do it, although from the man page I would expect that it does.


  Any fix that we apply should really be passed back to ISC.  I'll probably
file a PR with them regardless.
>Release-Note:
>Audit-Trail:
>Unformatted: