NetBSD Problem Report #22418

Received: (qmail 6936 invoked by uid 605); 9 Aug 2003 15:12:02 -0000
Message-Id: <200308091511.h79FBfQF013190@azenomei.knuffel.net>
Date: Sat, 9 Aug 2003 17:11:41 +0200 (CEST)
From: Rhialto <rhialto@azenomei.knuffel.net>
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: rhialto@azenomei.knuffel.net
To: gnats-bugs@gnats.netbsd.org
Subject: dhclient does not always (never?) update default route
X-Send-Pr-Version: 3.95

>Number:         22418
>Category:       bin
>Synopsis:       dhclient does not always (never?) update default route
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 09 15:13:00 +0000 2003
>Closed-Date:    Sun Sep 23 13:53:26 +0000 2018
>Last-Modified:  Sun Sep 23 13:53:26 +0000 2018
>Originator:     Rhialto
>Release:        NetBSD 1.6.1
>Organization:

>Environment:
System: NetBSD loelappie.falu.nl 1.6.1 NetBSD 1.6.1 (LOELAPPIE) #1: Fri Jul 11 19:56:16 CEST 2003 root@loelappie.falu.nl:/usr/src/sys/arch/i386/compile/LOELAPPIE i386
Architecture: i386
Machine: i386
>Description:

dhclient does not always (never?) update default route

When using netbsd 1.6.1 with cable ISP NetCabo.pt, I see the following
problem. Netcabo has the tendency to give a very short-time lease to a
192.168.*.* address, then when it expires it gives a real public
address. However, dhclient (or dhclient-script) does not cope properly
with this situation. It does not update the default route; although, as
far as I can see, it is provided in the dhcp message.
Also, during initial boot, a message "can't assign requested address"
appears, although it is not clear what command is causing it.

This is the final situation, which is clearly not usable:

Routing tables

Internet:
Destination        Gateway            Flags     Refs     Use    Mtu  Interface
default            192.168.100.1      UGS         1      379      -  vr0
127                127.0.0.1          UGRS        0        0  33220  lo0
127.0.0.1          127.0.0.1          UH          3        0  33220  lo0
192.168.100.18     127.0.0.1          UGHS        0        0  33220  lo0
213.22.22/23       link#1             UC          1        0      -  vr0
213.22.22.69       127.0.0.1          UGHS        0        0  33220  lo0
213.22.23.254      00:08:20:cc:dc:70  UHLc        0        0      -  vr0

vr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	address: 00:a0:cc:d4:f7:42
	media: Ethernet autoselect (10baseT)
	status: active
	inet 213.22.22.69 netmask 0xfffffe00 broadcast 213.22.23.255
	inet6 fe80::2a0:ccff:fed4:f742%vr0 prefixlen 64 scopeid 0x1

>How-To-Repeat:

	Connect a computer to a cable modem of NetCabo (Portugal), and
	use DHCP.

>Fix:
	manually enter the command (as root) route change default
	(whatever it should be in reality). Fortunately the address
	seems to find its way in the routing tables somehow (the last
	entry above).

-Olaf.
-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?

___ Olaf 'Rhialto' Seibert      -- The evil eye is caused by the black
\X/ rhialto/at/xs4all.nl        -- tongue - Tom Poes, "Het boze oog", 4456.
>Release-Note:
>Audit-Trail:

From: Olaf Seibert <rhialto@polderland.nl>
To: Rhialto <rhialto@azenomei.knuffel.net>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: bin/22418: dhclient does not always (never?) update default route
Date: Sat, 9 Aug 2003 20:29:19 +0200

 On Sat 09 Aug 2003 at 17:11:41 +0200, Rhialto wrote:
 > >Confidential:   yes

 This report was not intended to be confidential. Sorry about that.

 -Olaf.
 -- 
 ___ Olaf 'Rhialto' Seibert - rhialto@       -- "What good is a Ring of Power
 \X/ polderland.nl            -- if you're unable...to Speak." - Agent Elrond

State-Changed-From-To: open->feedback
State-Changed-By: rpaulo@netbsd.org
State-Changed-When: Sat, 13 Aug 2005 15:23:24 +0000
State-Changed-Why:
Can you please try with the new ISC DHCP 3.0.3 ? (only on NetBSD-current).
Thanks.


State-Changed-From-To: feedback->open
State-Changed-By: rpaulo@netbsd.org
State-Changed-When: Thu, 18 Aug 2005 20:29:19 +0000
State-Changed-Why:
Feedback provided.


From: lacombar@gmail.com
To: gnats-bugs@NetBSD.org
Cc: netbsd-bugs@netbsd.org
Subject: Re: PR/22418 dhclient does not always (never?) update default route
Date: Fri, 29 Sep 2006 16:03:15 -0400

 i encounter this bahaviour when a default route already exist. The
 following patch should correct the problem (at least, it works for
 me):

 Index: usr.sbin/dhcp/clientscript/dhclient-script
 ===================================================================
 RCS file: /data/netbsd/cvsroot/src/usr.sbin/dhcp/clientscript/dhclient-script,v
 retrieving revision 1.11
 diff -b -u -r1.11 dhclient-script
 --- usr.sbin/dhcp/clientscript/dhclient-script  23 Sep 2006 22:54:43
 -0000      1.11
 +++ usr.sbin/dhcp/clientscript/dhclient-script  29 Sep 2006 19:46:34 -0000
 @@ -59,6 +59,9 @@
  add_new_routes() {
         for router in $new_routers; do
                 route add default $router
 +               if [ $? -gt 0 ]; then
 +                       route change default $router
 +               fi
         done >/dev/null 2>&1

         set -- $new_static_routes

State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Sun, 23 Sep 2018 13:53:26 +0000
State-Changed-Why:
dhclient removed. sorry your bug was not answered at the time.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.