From owner-freebsd-bugs@FreeBSD.ORG Thu Aug 12 08:40:23 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1252016A4CE for ; Thu, 12 Aug 2004 08:40:23 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id EC52943D46 for ; Thu, 12 Aug 2004 08:40:22 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i7C8eMeE078137 for ; Thu, 12 Aug 2004 08:40:22 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i7C8eMsb078136; Thu, 12 Aug 2004 08:40:22 GMT (envelope-from gnats) Resent-Date: Thu, 12 Aug 2004 08:40:22 GMT Resent-Message-Id: <200408120840.i7C8eMsb078136@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, Matthew Luckie Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 17C0F16A4CE for ; Thu, 12 Aug 2004 08:32:03 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id EAA2943D49 for ; Thu, 12 Aug 2004 08:32:02 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i7C8W0j0038942 for ; Thu, 12 Aug 2004 08:32:00 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.11/8.12.11/Submit) id i7C8W0Q1038941; Thu, 12 Aug 2004 08:32:00 GMT (envelope-from nobody) Message-Id: <200408120832.i7C8W0Q1038941@www.freebsd.org> Date: Thu, 12 Aug 2004 08:32:00 GMT From: Matthew Luckie To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: bin/70355: [patch] dhclient-script is chatty with RENEW messages X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Aug 2004 08:40:23 -0000 >Number: 70355 >Category: bin >Synopsis: [patch] dhclient-script is chatty with RENEW messages >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: Thu Aug 12 08:40:22 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Matthew Luckie >Release: FreeBSD 4.10 >Organization: University of Waikato >Environment: FreeBSD latex.plunket.luckie.org.nz 4.10-RELEASE FreeBSD 4.10-RELEASE #6: Fri Jun 11 18:34:18 NZST 2004 root@latex.plunket.luckie.org.nz:/usr/src/sys/compile/latex alpha >Description: /sbin/dhclient-script logs the network number and broadcast address when RENEW is issued, even if they have not changed and the IP address RENEW'd is the same as the current lease. this can be a log filler if the dhcp server is in a cheap ADSL modem that sets the lease time to be really small. a patch is enclosed. perhaps the $reason clause could be expanded or dropped entirely, but the RENEW case is painful so this patch handles that case. Aug 12 07:00:14 latex dhclient: New Network Number: 203.118.169.0 Aug 12 07:00:14 latex dhclient: New Broadcast Address: 203.118.169.255 Aug 12 07:00:45 latex dhclient: New Network Number: 203.118.169.0 Aug 12 07:00:45 latex dhclient: New Broadcast Address: 203.118.169.255 Aug 12 07:01:13 latex dhclient: New Network Number: 203.118.169.0 Aug 12 07:01:13 latex dhclient: New Broadcast Address: 203.118.169.255 >How-To-Repeat: set a short TTL on leases with dhcpd if you don't own a cheap ADSL modem. >Fix: --- /usr/src/contrib/isc-dhcp/client/scripts/freebsd.orig Mon Feb 2 09:56:52 2004 +++ /usr/src/contrib/isc-dhcp/client/scripts/freebsd Thu Aug 12 19:50:04 2004 @@ -44,14 +44,31 @@ fi fi +# Only print out the new network number if it is new if [ x$new_network_number != x ]; then - $LOGGER New Network Number: $new_network_number + if [ x$reason = xRENEW ]; then + if [ x$old_network_number != x ] && + [ x$old_network_number != x$new_network_number ]; then + $LOGGER New Network Number: $new_network_number + fi + else + $LOGGER New Network Number: $new_network_number + fi fi +# Only print out the new broadcast address if it is new if [ x$new_broadcast_address != x ]; then - $LOGGER New Broadcast Address: $new_broadcast_address + if [ x$reason = xRENEW ]; then + if [ x$old_broadcast_address != x ] && + [ x$old_broadcast_address != x$new_broadcast_address ]; then + $LOGGER New Broadcast Address: $new_broadcast_address + fi + else + $LOGGER New Broadcast Address: $new_broadcast_address + fi new_broadcast_arg="broadcast $new_broadcast_address" fi + if [ x$old_broadcast_address != x ]; then old_broadcast_arg="broadcast $old_broadcast_address" fi >Release-Note: >Audit-Trail: >Unformatted: