After upgrading from netifrc-0.7.9 to netifrc-0.7.11 and rebooting, my static IPv6 connection has stopped working because the default route is not getting set. At boot, the following error is shown: * Bringing up interface eth0 * Caching network module dependencies * (redacted)/64 ... [ ok ] * Adding routes * default via fe80::1 ... Error: Egress device not specified. [ !! ] [ !! ] Downgrading to netifrc-0.7.9 and rebooting makes it work normally again. IPv6 networking itself is working, I can ping fe80::1. It's just that the default route is not being set properly. in /etc/conf.d/net I am specifying my address and default route like this for years: config_eth0="(redacted ipv6 address)/64" routes_eth0="default via fe80::1" (Yes, fe80::1 is the correct gateway, it is how they do it on Hetzner cloud VM) if I manually try to set the default route without specifying a device, it has the same Egress error as shown at boot time: # ip -6 route add default via fe80::1 Error: Egress device not specified. However, when I add dev to the command, it works and IPv6 comes to life: # ip -6 route add default via fe80::1 dev eth0 I searched and could it possibly be related to the latest commits from bug #637394 that talks about no-interface routes? Or is my config syntax wrong and I've been lucky that it ever worked at all? Thank you! Reproducible: Always Steps to Reproduce: 1. Upgrade from net-misc/netifrc-0.7.9 to net-misc/netifrc-0.7.11 2. Reboot 3. IPv6 default route fails to be set Actual Results: * Bringing up interface eth0 * Caching network module dependencies * (redacted)/64 ... [ ok ] * Adding routes * default via fe80::1 ... Error: Egress device not specified. [ !! ] [ !! ] Expected Results: IPv6 default route should be working as usual Portage 3.0.66.1 (python 3.12.6-final-0, default/linux/amd64/23.0/split-usr/no-multilib/hardened, gcc-14, glibc-2.40-r3, 6.6.52-gentoo x86_64) ================================================================= System uname: Linux-6.6.52-gentoo-x86_64-Intel_Xeon_Processor_-Skylake,_IBRS-with-glibc2.40 KiB Mem: 16009048 total, 15416612 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Sat, 28 Sep 2024 14:00:00 +0000 Head commit of repository gentoo: 52f12f08693d447b1b99f32baa1f6641c15a930c sh bash 5.2_p37 ld GNU ld (Gentoo 2.43 p2) 2.43.1 app-misc/pax-utils: 1.3.8::gentoo app-shells/bash: 5.2_p37::gentoo dev-build/autoconf: 2.72-r1::gentoo dev-build/automake: 1.17-r1::gentoo dev-build/cmake: 3.30.3::gentoo dev-build/libtool: 2.4.7-r4::gentoo dev-build/make: 4.4.1-r100::gentoo dev-build/meson: 1.5.2::gentoo dev-lang/perl: 5.40.0::gentoo dev-lang/python: 3.12.6_p4::gentoo, 3.13.0_rc2_p2::gentoo dev-lang/rust-bin: 1.81.0::gentoo sys-apps/baselayout: 2.15::gentoo sys-apps/openrc: 0.55.1::gentoo sys-apps/sandbox: 2.39::gentoo sys-devel/binutils: 2.43-r1::gentoo sys-devel/binutils-config: 5.5.2::gentoo sys-devel/gcc: 14.2.1_p20240921::gentoo sys-devel/gcc-config: 2.11::gentoo sys-kernel/linux-headers: 6.10::gentoo (virtual/os-headers) sys-libs/glibc: 2.40-r3::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 volatile: True sync-rsync-verify-metamanifest: yes sync-rsync-verify-max-age: 3 sync-rsync-verify-jobs: 1 sync-rsync-extra-opts: overlay location: /usr/local/portage masters: gentoo priority: 0 volatile: True Binary Repositories: binhost priority: 9999 sync-uri: https://mirror.hetzner.de/gentoo/releases/amd64/binpackages/23.0/x86-64_hardened Installed sets: @kernels ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-mtune=skylake-avx512 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/gconf /etc/gentoo-release /etc/php/apache2-php8.3/ext-active/ /etc/php/cgi-php8.3/ext-active/ /etc/php/cli-php8.3/ext-active/ /etc/php/fpm-php8.3/ext-active/ /etc/php/phpdbg-php8.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CPPFLAGS="-mtune=skylake-avx512 -O2 -pipe" CXXFLAGS="-mtune=skylake-avx512 -O2 -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--nospinner --quiet-build=n --getbinpkg --binpkg-respect-use=y" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-request-signature buildpkg buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="ftp://mirror.hetzner.de/gentoo/" LANG="en_US.UTF-8" LDFLAGS="-Wl,--as-needed" LEX="flex" LINGUAS="en en_US" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_BINHOST="/usr/portage/packages/" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" SHELL="/bin/bash" USE="X acl amd64 bzip2 cet crypt elogind gdbm hardened iconv imap ipv6 libtirpc libwww maildir mysql ncurses nls openmp pam pcre pic pie readline sasl seccomp slang split-usr ssl ssp test-rust unicode vhosts xattr xml xtpax zlib" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GRUB_PLATFORMS="qemu efi-64 pc" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby31 ruby32" VIDEO_CARDS="qxl fbdev vesa virtualbox" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account" Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Hi, it seems it was actuall this commit: https://github.com/gentoo/netifrc/commit/97a79cfd068a6cc07e9feed0ac5b71f64347ae4a ${rtype} there should be in quotes, I think: "${rtype}" I'll prepare a pull request or a patch later.
I don't mean the patch was bad, it did the right thing by dropping bashism. But unfortunately, bashism forgave the missing quotes and with the original patch, there was no problem. I've created the pull request to fix the issue: https://github.com/gentoo/netifrc/pull/58
Thank you Alexander. I can confirm your fix solves the problem in my case.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=ba522492a3f9e057867f4d7f1d2491cd3a7dbfc3 commit ba522492a3f9e057867f4d7f1d2491cd3a7dbfc3 Author: Alexander Zubkov <green@qrator.net> AuthorDate: 2024-09-28 19:54:51 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-09-29 00:28:25 +0000 net: iproute2: fix missing quotes in test Missing quotes cause incorrect evaluation of an empty string, causing the expression to be always true. Thus every route is considered "nodev" route, causing problems in cases where specific dev is required. Original "nodev" patch 7c6a8de0 contained bashism that forgave missing quoutes. But later it was fixed by 97a79cfd, and the missing quotes became critical. Signed-off-by: Alexander Zubkov <green@qrator.net> Closes: https://bugs.gentoo.org/940443 X-Gentoo-Bug: 940443 X-Gentoo-Bug-URL: https://bugs.gentoo.org/940443 Closes: https://github.com/gentoo/netifrc/pull/58 Signed-off-by: Sam James <sam@gentoo.org> net/iproute2.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b3ef661b902f0f1be22f905a437be9ad3ae0972b commit b3ef661b902f0f1be22f905a437be9ad3ae0972b Author: Sam James <sam@gentoo.org> AuthorDate: 2024-09-29 00:30:05 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-09-29 00:30:23 +0000 net-misc/netifrc: add 0.7.12 Alexander Zubkov (1): net: iproute2: fix missing quotes in test Sam James (1): Makefile.inc: prepare for netifrc-0.7.12 Closes: https://bugs.gentoo.org/940443 Signed-off-by: Sam James <sam@gentoo.org> net-misc/netifrc/Manifest | 1 + net-misc/netifrc/netifrc-0.7.12.ebuild | 94 ++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+)
Thank you for both the report & Alexander for fixing my error!
Thanks for the fix. This bit us this morning actually, for a completely different reason (we rely on RAs for installing routes, so the only place where we care about this is things like haproxy where we spoof the source address towards the destination host, and where haproxy runs inside the same subnet as the actual hosts, but is not not normal gateway). I'm still thinking nodev routes should be more explicit (just can't remember where that discussion happened, but I'll track it down at some point and see if I can't generate PRs to have non-bash versions of much of both the v6 specific and routing work we've done over the years).