Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 382251 - sys-apps/openrc-0.8.3-r1: net.lo init script does not remove multiple RPDB rules
Summary: sys-apps/openrc-0.8.3-r1: net.lo init script does not remove multiple RPDB rules
Status: RESOLVED DUPLICATE of bug 372547
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
Depends on:
Reported: 2011-09-08 09:04 UTC by Christian Kauhaus
Modified: 2011-09-08 15:22 UTC (History)
0 users

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


Note You need to log in before you can comment on or make changes to this bug.
Description Christian Kauhaus 2011-09-08 09:04:35 UTC
When I configure multiple RPDB rules via the rules_* variable for a network device, they are correctly created on service start but only partially removed on service shutdown.

The cause is in the function iproute2_post_stop in /lib64/rc/net/ 'service_get_value "ip_rule"' seems to return only the first line.

Reproducible: Always

Steps to Reproduce:
## relevant /etc/conf.d/net snippet
    from table 2 priority 20
    to table 2 priority 20

## start with stock RPDB
# ip rule
0:	from all lookup local 
32766:	from all lookup main 
32767:	from all lookup default 

## start interface 'ethfe'
# # /etc/init.d/net.ethfe start
 * Bringing up interface ethfe
 *   Running preup ...
 * ...                                                   [ ok ]
 * ...                                                    [ ok ]
 *   2001:470:9aaf:42::b/64 ...                                           [ ok ]
 *   Adding routes
 * table 2 ...                                          [ ok ]
 *     default via table 2 initcwnd 10 ...                     [ ok ]
 *     default via initcwnd 10 ...                             [ ok ]
 *   Adding RPDB rules
 *   Waiting for IPv6 addresses ...                                       [ ok ]
 *   Running postup ...

## RPDB contains two rules, this is as expected
# ip rule
0:	from all lookup local 
20:	from lookup fe 
20:	from all to lookup fe 
32766:	from all lookup main 
32767:	from all lookup default 

## now stop 'ethfe' again
# /etc/init.d/net.ethfe stop
 * Bringing down interface ethfe
 *   Running predown ...
 *   Removing RPDB rules
 *   Running postdown ...

Actual Results:  
## after performing the above mentioned steps, one rule of two still remains
# ip rule
0:	from all lookup local 
20:	from all to lookup fe 
32766:	from all lookup main 
32767:	from all lookup default 

Expected Results:  
## RPDB should be empty again
# ip rule
0:	from all lookup local 
32766:	from all lookup main 
32767:	from all lookup default 

# emerge --info openrc
Portage (default/linux/x86/10.0, gcc-4.4.5, glibc-2.12.2-r0, 2.6.38-gentoo-r6 i686)
                        System Settings
System uname: Linux-2.6.38-gentoo-r6-i686-Intel-R-_Xeon-R-_CPU_E5502_@_1.87GHz-with-gentoo-2.0.3
Timestamp of tree: Wed, 10 Aug 2011 00:45:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:          4.1_p9
dev-lang/python:          2.5.4-r4, 2.6.6-r2, 2.7.1-r1, 3.1.3-r1
dev-util/ccache:          2.4-r9
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.4
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.20.1-r1
sys-devel/gcc:            4.4.5
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82
sys-kernel/linux-headers: (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo gocept
CFLAGS="-O2 -pipe -march=i686"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/conf.d/apache2 /etc/eclean /etc/env.d /etc/fonts /etc/gconf /etc/gentoo-release /etc/init.d /etc/openldap/schema /etc/portage/savedconfig /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=i686"
FEATURES="assume-digests binpkg-logs buildpkg ccache distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch usersandbox"
GENTOO_MIRRORS=" ftp://services03/pub"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de en"
MAKEOPTS="-j1 -l1"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="acl acpi apache2 bash-completion berkdb bzip2 cli cracklib crypt ctype curl cxx device-mapper dri filter fortran gd gdbm geoip gnutls iconv ipv6 jpeg json kvm ldap logrotate mercurial mhash mudflap nagios-dns nagios-ping nagios-ssh ncurses nls nptl nptlonly openmp pam pcre perl png pppd python readline sasl session simplexml snmp sqlite sqlite3 sse sse2 ssl suexec symlink sysfs syslog tcpd threads tiff tools truetype unicode utils vhosts vim-syntax x86 xattr xinetd xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias proxy proxy_balancer proxy_connect proxy_ftp proxy_http" CALLIGRA_FEATURES="braindump flow karbon kexi kpresenter krita tables words" 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" LINGUAS="de en" 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" 

                        Package Settings

sys-apps/openrc-0.8.3-r1 was built with the following:
USE="ncurses pam unicode -debug (-selinux)"
CFLAGS="-O2 -march=i686 -pipe"
CXXFLAGS="-O2 -march=i686 -pipe"
Comment 1 Christian Ruppert (idl0r) gentoo-dev 2011-09-08 15:22:36 UTC
Try 0.9.x please.

*** This bug has been marked as a duplicate of bug 372547 ***