Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 206036 - baselayout-1.12.10-r5 net fallback configuration ignored due to dhcpcd reuse of old lease
Summary: baselayout-1.12.10-r5 net fallback configuration ignored due to dhcpcd reuse ...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-15 23:42 UTC by Renato Alves
Modified: 2008-01-18 22:26 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Renato Alves 2008-01-15 23:42:18 UTC
This problem is not related to the new IPV4LL behavior.

This is what happens if the lease file is "very old":

 * Starting eth0
 *   Bringing up eth0
 *     dhcp
 *       Running dhcpcd ...
Error, eth0: timed out
Error, eth0: lease expired 125761 seconds ago                             [ !! ]
 *     Trying fallback configuration
 *     192.168.176.150                                                    [ ok ]

The IP defined is the one defined in the fallback configuration.
However, if the lease is recent:

Acquiring a new IP:
 * Starting eth0
 *   Bringing up eth0
 *     dhcp
 *       Running dhcpcd ...                                               [ ok ]
 *       eth0 received address 192.168.175.199/24

I then disconnect the cable and...

# /etc/init.d/net.eth0 restart
 * Stopping eth0
 *   Bringing down eth0
 *     Stopping dhcpcd on eth0 ...                                        [ ok ]
 *     Shutting down eth0 ...                                             [ ok ]
 * Starting eth0
 *   Bringing up eth0
 *     dhcp
 *       Running dhcpcd ...
Error, eth0: timed out                                                    [ ok ]
 *       eth0 received address 192.168.175.199/24

As you can see dhcpcd failed to acquire an IP and timed out, but then the "old" IP is used as if it was received by dhcpcd.

Not only it ignores the fallback settings, but also assumes an old IP.

If I run dhcpcd manually with the same parameters I have in /etc/conf.d/net and dhcpcd fails to acquire an IP with a timeout error, no IP is defined on the interface.

The only way to clean the cache is by running:
# dhcpcd -k eth0
# dhcpcd eth0 (waiting for the timeout and then)
# /etc/init.d/net.eth0 restart

Reproducible: Always

Steps to Reproduce:
1. Setup some fallback settings.
2. Connect the computer to any network
3. /etc/init.d/net.eth0 restart ; Make sure you received an IP
4. Disconnect the cable
5. /etc/init.d/net.eth0 restart ; Check if the old IP is used instead of the fallback



conf.d/net contents

config_eth0=( "dhcp" )
dhcpcd_eth0="-L -Y -N -t 10"
fallback_eth0=( "192.168.176.150 broadcast 192.168.176.255 netmask 255.255.255.0" )

emerge --info

Portage 2.1.3.19 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.22-gentoo-r9 i686)
=================================================================
System uname: 2.6.22-gentoo-r9 i686 Intel(R) Pentium(R) M processor 2.00GHz
Timestamp of tree: Tue, 15 Jan 2008 17:47:01 +0000
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium-m -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=pentium-m -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="collision-protect distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://darkstar.ist.utl.pt/gentoo/ http://ftp.dei.uc.pt/pub/linux/gentoo/ http://cesium.di.uminho.pt/pub/gentoo/"
LANG="en_US.UTF-8"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/science /usr/local/portage"
SYNC="rsync://darkstar.ist.utl.pt/gentoo-portage"
USE="X alsa berkdb bitmap-fonts bzip2 cli cracklib crypt cups dri firefox fortran gdbm gif gpm iconv ipv6 isdnlog jpeg midi mudflap ncurses nptl nptlonly opengl openmp pcre perl png pppd python readline reflection sdl session spl sse sse2 ssl tcpd tiff truetype truetype-fonts type1-fonts unicode x86 xorg zlib" ALSA_CARDS="intel8x0 intel8x0m" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http rewrite setenvif speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev fglrx vesa radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Roy Marples 2008-01-18 14:46:19 UTC
What version of dhcpcd? Could you re-test with 3.1.9? Thanks
Comment 2 Renato Alves 2008-01-18 22:26:13 UTC
(In reply to comment #1)
> What version of dhcpcd? Could you re-test with 3.1.9? Thanks
> 

The current stable... dhcpcd-3.1.5-r1.

Just tested with the latest dhcpcd.

I could no longer reproduce the problem.
It seems this was not a baselayout bug but a dhcpcd one.

Should I report a new bug? Requesting for stabilization of a higher dhcpcd version?