Summary: | sys-apps/openrc-0.11.4: ifconfig module doesn't support ipv6 routes without explicit prefix | ||
---|---|---|---|
Product: | Gentoo Hosted Projects | Reporter: | Alexander Tsoy <alexander> |
Component: | netifrc | Assignee: | netifrc Team <netifrc> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 404503 | ||
Attachments: |
openrc-ipv6-fixes.patch
fix-ipv6-routes-and-default-route.patch |
Description
Alexander Tsoy
2012-11-10 12:01:23 UTC
Created attachment 332914 [details, diff] openrc-ipv6-fixes.patch I believe this problem is mostly fixed in commit a61fdd0 (bug 447310). But there is still one problem. 'route' command dislikes '-net' and '-host' prefixes in target definition for ipv6 routes. So here is a patch which fixes this. Plus some ipv6-related changes in init.d script. The changes to net.lo.in have been applied in commit 2b0ff6f. I have a question about the change below: *snip* diff -urN openrc-0.11.8.orig/net/ifconfig.sh.Linux.in openrc-0.11.8/net/ifconfig.sh.Linux.in --- openrc-0.11.8.orig/net/ifconfig.sh.Linux.in 2012-12-07 19:53:28.000000000 +0400 +++ openrc-0.11.8/net/ifconfig.sh.Linux.in 2012-12-21 15:44:43.000000000 +0400 @@ -209,7 +209,7 @@ fi case "$@" in - *:*) [ "$1" = "-net" ] && shift;; + *:*|default*) [ "$1" = "-net" -o "$1" = "-host" ] && shift;; esac route ${family} add "$@" dev "${IFACE}" *snip* Why are you adding '|default*' to this case statement? Thanks, William (In reply to comment #2) > - *:*) [ "$1" = "-net" ] && shift;; > + *:*|default*) [ "$1" = "-net" -o "$1" = "-host" ] && shift;; > Why are you adding '|default*' to this case statement? > Because net.lo init.d script adds '-net' before 'default'. If we deal with ipv6 routes then '-net' makes route command unhappy - it tries to resolve it as a host name. $ LANG=C sudo route -A inet6 add -net default gw xxxx:xxx:xxx:xxx::1 getaddrinfo: #net: -2 #net: Unknown host $ Thanks for the clarification. The secont part of this patch is in commit a8ab9d6. Sorry, but this is not correct. It really should be '|*default*', but if somebody will use hostnames which includes substring 'default' then this will also match. How about this? if [ "$1" = "-net" -o "$1" = "-host" ]; then if [ "${2##*:}" != "$2" ]; then shift elif [ "$2" = "default" ]; then shift fi fi Created attachment 333262 [details, diff]
fix-ipv6-routes-and-default-route.patch
InGit. |