Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 410271 - net init scripts fail to add route source address to tunnel interface: "RTNETLINK answers: Invalid argument"
Summary: net init scripts fail to add route source address to tunnel interface: "RTNET...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: netifrc (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: netifrc Team
URL:
Whiteboard: netifrc:tunnel
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-30 20:30 UTC by Matt Whitlock
Modified: 2013-08-28 17:19 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 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
 *   127.0.0.1/8 ...
 [ ok ]
 *   Adding routes
 *     127.0.0.0/8 via 127.0.0.1 ...
 [ ok ]
 * Bringing up interface eth0
 *   xxx.xxx.xxx.137/25 ...
 [ ok ]
 *   xxx.xxx.xxx.138/25 ...
 [ ok ]
 *   xxxx:xxxx:d:xxxx::1/64 ...
 [ ok ]
 *   xxxx:xxxx:d:xxxx::2/64 ...
 [ ok ]
 *   Adding routes
 *     default via xxx.xxx.xxx.129 ...
 [ 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="xxx.xxx.xxx.137/25 xxx.xxx.xxx.138/25 xxxx:xxxx:d:xxxx::1/64 xxxx:xxxx:d:xxxx::2/64"
routes_eth0="default via xxx.xxx.xxx.129"

iptunnel_he6="mode sit remote xxx.xxx.xxx.42 local xxx.xxx.xxx.137 ttl 255"
config_he6="xxxx:xxxx:c:xxxx::2/64"
routes_he6="default src xxxx:xxxx:d:xxxx::1"
rc_need_he6="net.eth0"


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 2.1.10.49 (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/openrc:          0.9.8.4
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
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
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"
DISTDIR="/usr/local/portage/distfiles"
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"
FFLAGS=""
GENTOO_MIRRORS="http://gentoo.mirrors.hoobly.com/ http://chi-10g-1-mirror.fastsoft.net/pub/linux/gentoo/gentoo-distfiles/ http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://mirror.its.uidaho.edu/pub/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/local/portage/packages"
PORTAGE_CONFIGROOT="/"
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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/vmware /var/lib/layman/bitcoin"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
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"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS