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 iproute2.sh and ifconfig.sh, 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 iproute2.sh.)
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.
Patch against /etc/init.d/net.lo as shipped by sys-apps/openrc-0.11.8.
Created attachment 332338 [details, diff]
Patch to fix the address family selection in net.lo.
Your patch is applied in commit a61fdd0.
Thanks for the report.