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

Bug 447310

Summary: sys-apps/openrc - Fix family selection of routes_<dev> in /etc/init.d/net.lo
Product: Gentoo Linux Reporter: Mihai Moldovan <ionic>
Component: [OLD] Core systemAssignee: OpenRC Team <openrc>
Severity: minor CC: alexander, tomwij, whissi
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 439098    
Attachments: Patch to fix the address family selection in net.lo.

Description Mihai Moldovan 2012-12-15 03:54:16 UTC
We're currently unable to use a route clause like this, due a bug in net.lo:

routes_<dev>="-6 default dev <dev>"

Judging from the code of _add_route in and, this should be supported, however net.lo is messing the address family selection up by placing a -net or -host in front of the command (which is later stripped anyway, at least in

My patch will correct the behavior and let you choose the address family like it was intended to.

Side note: some people may say this is unnecessary, but there is at least one corner case, in which address family selection is mandatory:

# Create the IPv6 sit tunnel 'ipv6'.
iptunnel_ipv6="mode sit remote <remote> local <local>"


# Add addresses to my bridge br0 (gluing LAN and WiFi interfaces together.)
# Note, that the device ipv6 is not assigned any address!

# Now, we have to add ipv6 as our default IPv6 gateway, but we can't use "via", as there is no address assigned to ipv6 *directly* but rather to the bridge br0, and the link local address is autogenerated and probably not usable anyway.
routes_ipv6="-6 default dev ipv6"

Also, trying to use 'routes_ipv6="default dev ipv6"' would work, but this command is defaulting to the IPv4 address family and... let's just say we don't really want to set a sit tunnel as our default IPv4 gateway.

Reproducible: Always

Patch against /etc/init.d/net.lo as shipped by sys-apps/openrc-0.11.8.
Comment 1 Mihai Moldovan 2012-12-15 03:55:24 UTC
Created attachment 332338 [details, diff]
Patch to fix the address family selection in net.lo.
Comment 2 William Hubbs gentoo-dev 2012-12-20 22:06:26 UTC
Your patch is applied in commit a61fdd0.
Thanks for the report.