Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 181111 - netplugd+wpa_supplicant don't handle ipv6 autoconfiguration well
Summary: netplugd+wpa_supplicant don't handle ipv6 autoconfiguration well
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-06 18:50 UTC by Sascha Hlusiak
Modified: 2007-07-11 17:46 UTC (History)
0 users

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 Sascha Hlusiak 2007-06-06 18:50:00 UTC
1) sys-apps/netplug and net-wireless/wpa_supplicant both set the interface up. When an interface is up, the kernel broadcasts for an ipv6 router although the media is not ready yet (cable not connected, wlan not enabled). When the media gets ready, no more router solicitation messages are sent so the ipv6 address gets available after some minutes, when the router decides to send a router advertisement message again.

2) When disconnecting the cable/wireless, the interface remains up. Existing ipv6 addresses are removed, but the routes remain! This is really bad when you change the media (switching from wireless to cable) because the existing default route is still used.

ifconfig eth0 after media disconnect:

eth0      Link encap:Ethernet  HWaddr 00:02:3F:18:3A:37
          inet6 addr: fe80::202:3fff:fe18:3a37/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:632992 errors:107 dropped:209 overruns:107 frame:0
          TX packets:1111104 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:220882481 (210.6 Mb)  TX bytes:1214945735 (1158.6 Mb)
          Interrupt:10 Base address:0xe000


ip -6 route show after media disconnect:

2001:5c0:8dd5::/64 dev eth0  proto kernel  metric 256  expires 2146773sec mtu 1500 advmss 1440 hoplimit 4294967295
fe80::/64 dev eth0  metric 256  expires 21334315sec mtu 1500 advmss 1440 hoplimit 4294967295
ff00::/8 dev eth0  metric 256  expires 21334315sec mtu 1500 advmss 1440 hoplimit 4294967295
default via fe80::202:44ff:fe0b:a6b8 dev eth0  proto kernel  metric 1024  expires 1743sec mtu 1500 advmss 1440 hoplimit 64


ifconfig eth0 down deletes the remaining ipv6 routes of the interface. This problem exists with netplugd as well as with wpa_supplicant.


Reproducible: Always

Steps to Reproduce:
1. setup radvd on a host
2. enable ipv6 and netplugd/wireless on client
3. plug and unplug cable

Actual Results:  
ipv6 routes still remain when the interface is not down-ed

Expected Results:  
routes are deleted properly
Comment 1 Roy Marples (RETIRED) gentoo-dev 2007-06-26 08:41:56 UTC
Sounds more like a baselayout bug. You neglected to attach emerge --info, so I don't know which version you're using.
Comment 2 Sascha Hlusiak 2007-06-26 10:13:17 UTC
Alright, sorry. Here my emerge --info:

Portage 2.1.3_rc5 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.5-r3, 2.6.21-suspend2-r6 i686)
=================================================================
System uname: 2.6.21-suspend2-r6 i686 Intel(R) Pentium(R) M processor 1500MHz
Gentoo Base System release 1.12.10
Timestamp of tree: Tue, 26 Jun 2007 10:00:10 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
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.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=pentium-m -mtune=pentium-m -pipe -fomit-frame-pointer -msse2"
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/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-Os -march=pentium-m -mtune=pentium-m -pipe -fomit-frame-pointer -msse2"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans"
GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://pandemonium.tiscali.de/pub/gentoo/ "
LANG="de_DE@euro"
LC_ALL="de_DE@euro"
LINGUAS="de"
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/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acpi alsa arts bash-completion bzip2 crypt cups dbus divx dri dv dvd dvdread encode exif ffmpeg hal ipv6 jpeg kde kdehiddenvisibility mmx mp3 nls nptl ogg opengl png quicktime readline real sdl sndfile speex sse sse2 ssl threads truetype udev usb vorbis win32codecs x86 xcomposite xv xvid zlib" CAMERAS="canon" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="i810"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Roy Marples (RETIRED) gentoo-dev 2007-07-11 17:46:46 UTC
(In reply to comment #0)
> 1) sys-apps/netplug and net-wireless/wpa_supplicant both set the interface up.
> When an interface is up, the kernel broadcasts for an ipv6 router although the
> media is not ready yet (cable not connected, wlan not enabled). When the media
> gets ready, no more router solicitation messages are sent so the ipv6 address
> gets available after some minutes, when the router decides to send a router
> advertisement message again.

Not much we can do about this as userland as no way of telling the kernel to broadcast for an IP6 router.

> 2) When disconnecting the cable/wireless, the interface remains up. Existing
> ipv6 addresses are removed, but the routes remain!

This is solved with baselayout-2, so marking as fixed.