Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 410271

Summary: net init scripts fail to add route source address to tunnel interface: "RTNETLINK answers: Invalid argument"
Product: Gentoo Hosted Projects Reporter: Matt Whitlock <gentoo>
Component: netifrcAssignee: netifrc Team <netifrc>
Status: UNCONFIRMED ---    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard: netifrc:tunnel
Package list:
Runtime testing required: ---

Description Matt Whitlock 2012-03-30 20:30:23 UTC
I have two IPv4 addresses on one physical interface and two IPv6 addresses on a SIT tunnel.  The net init scripts fail to add the default route to the tunnel interface because the route is specified with a source address that is rejected by the kernel, presumably because it has not yet been verified by the duplicate address detection algorithm.

Here's an excerpt from the rc.log (with IP addresses redacted):

 * Bringing up interface lo
 * ...
 [ ok ]
 *   Adding routes
 * via ...
 [ ok ]
 * Bringing up interface eth0
 * ...
 [ ok ]
 * ...
 [ ok ]
 *   xxxx:xxxx:d:xxxx::1/64 ...
 [ ok ]
 *   xxxx:xxxx:d:xxxx::2/64 ...
 [ ok ]
 *   Adding routes
 *     default via ...
 [ ok ]
 * Bringing up interface he6
 *   Creating tunnel he6 ...
 [ ok ]
 *   xxxx:xxxx:c:xxxx::2/64 ...
 [ ok ]
 *   Adding routes
 *     default src xxxx:xxxx:d:xxxx::1 ...
RTNETLINK answers: Invalid argument
 [ !! ]

Here's my /etc/conf.d/net:

config_eth0=" xxxx:xxxx:d:xxxx::1/64 xxxx:xxxx:d:xxxx::2/64"
routes_eth0="default via"

iptunnel_he6="mode sit remote local ttl 255"
routes_he6="default src xxxx:xxxx:d:xxxx::1"

After fully booting the system, if I then stop net.he6 and restart it, its default route is added correctly.  The problem at boot time appears to be that the xxxx:xxxx:d:xxxx::1 address has not been fully added to the eth0 interface by the time the attempt is made to add the default route to the he6 interface.

This may be a resurgence of bug 169442.

# emerge --info
Portage (default/linux/amd64/10.0/no-multilib, gcc-4.5.3, glibc-2.13-r4, 3.2.12-gentoo x86_64)
System uname: Linux-3.2.12-gentoo-x86_64-Intel-R-_Atom-TM-_CPU_D525_@_1.80GHz-with-gentoo-2.0.3
Timestamp of tree: Fri, 30 Mar 2012 10:00:01 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo vmware bitcoin
CFLAGS="-march=native -O2 -pipe"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/gconf /etc/gentoo-release /etc/init.d /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTDIR_OVERLAY="/var/lib/layman/vmware /var/lib/layman/bitcoin"
USE="amd64 apache2 berkdb bzip2 cli cracklib crypt cups cxx dri gdbm git iconv ipv6 mmx modules mudflap mysql ncurses nptl nptlonly openmp pcre perl pppd python readline session sse sse2 ssl subversion sysfs threads unicode vhosts xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="alias auth_basic authn_file authz_host authz_user autoindex cgi dir env headers include log_config mime rewrite setenvif userdir" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"