From owner-freebsd-bugs@FreeBSD.ORG Mon Jul 30 15:20:09 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 876A0106566C for ; Mon, 30 Jul 2012 15:20:09 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 5FCBB8FC12 for ; Mon, 30 Jul 2012 15:20:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q6UFK9fL038585 for ; Mon, 30 Jul 2012 15:20:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q6UFK9Y5038584; Mon, 30 Jul 2012 15:20:09 GMT (envelope-from gnats) Resent-Date: Mon, 30 Jul 2012 15:20:09 GMT Resent-Message-Id: <201207301520.q6UFK9Y5038584@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, John Poznicek Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B634F106566B for ; Mon, 30 Jul 2012 15:14:26 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id A108D8FC15 for ; Mon, 30 Jul 2012 15:14:26 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q6UFEQst048833 for ; Mon, 30 Jul 2012 15:14:26 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q6UFEQgu048831; Mon, 30 Jul 2012 15:14:26 GMT (envelope-from nobody) Message-Id: <201207301514.q6UFEQgu048831@red.freebsd.org> Date: Mon, 30 Jul 2012 15:14:26 GMT From: John Poznicek To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/170279: dhclient uses low TTL of 16 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2012 15:20:09 -0000 >Number: 170279 >Category: misc >Synopsis: dhclient uses low TTL of 16 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jul 30 15:20:09 UTC 2012 >Closed-Date: >Last-Modified: >Originator: John Poznicek >Release: 8.3 >Organization: none >Environment: freebsd# uname -a FreeBSD freebsd.local.lan 8.3-RELEASE-p3 FreeBSD 8.3-RELEASE-p3 #0: Mon Jun 11 23:52:38 UTC 2012 root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386 >Description: dhclient uses by default ttl of 16, depending on isp this can prevent getting dhcp lease from dhcp server. Helping user troubleshoot problem with freebsd based pfsense, user discovered that ttl of dhcp traffic was at 16, vs os default. info can be found in this thread http://forum.pfsense.org/index.php/topic,51803.0.html Per packet.c in source, http://svnweb.freebsd.org/base/release/8.3.0/sbin/dhclient/packet.c?revision=234063&view=markup p.ip_ttl = 16; Verified this with tcpdump both on freebsd machine along with on dhcp server in local network. TTL on dhcp traffic shows 16 10:09:51.512335 00:0c:29:9a:bc:8a (oui Unknown) > Broadcast, ethertype IPv4 (0x0800), length 342: (tos 0x10, ttl 16, id 0, offset 0, flags [none], proto UDP (17), length 328) With default dhclient user not able to get dhcp from his isp. Using modified dhclient where packet.c p.ip_ttl changed 128 user was able to get IP from his ISP dhcp server. >How-To-Repeat: Request lease and check dhcp traffic for ttl. 10:09:51.512335 00:0c:29:9a:bc:8a (oui Unknown) > Broadcast, ethertype IPv4 (0x0800), length 342: (tos 0x10, ttl 16, id 0, offset 0, flags [none], proto UDP (17), length 328) >Fix: Changed p.ip_ttl = 16; To be p.ip_ttl = 128; Ran make, used this new modified dhclient, verified via tcpdump that client was now setting ttl to 128 This allowed dhclient to obtain ip address from dhcp server. 10:04:47.893610 00:0c:29:9a:bc:8a (oui Unknown) > Broadcast, ethertype IPv4 (0x0800), length 342: (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328) >Release-Note: >Audit-Trail: >Unformatted: