Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 34653 - Modified init.d/net.eth0 && conf.d/net to support static IPv6 network
Summary: Modified init.d/net.eth0 && conf.d/net to support static IPv6 network
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on: 33310
Blocks:
  Show dependency tree
 
Reported: 2003-11-28 16:27 UTC by Stefano Balocco
Modified: 2004-12-04 18:37 UTC (History)
2 users (show)

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


Attachments
[PATCH] net.eth0 gateway6+bugfixes updated for baselayout 1.8.8 (net.eth0-patch_burN-shadow-1.diff,1.75 KB, patch)
2004-04-13 19:55 UTC, Eric Shattow
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefano Balocco 2003-11-28 16:27:02 UTC
When i try to setup my IPv6 home-lan, i see that gentoo seems to not allow
static IPv6 configuration in the conf.d/net and init.d/net.eth0 (as a IPv6 lan
client).
so i do a very very simple modification to support it.
it seems work good :)

Reproducible: Always
Steps to Reproduce:
1.
2.
3.




i just add, under the gateway configuration, this little copy&pasted block :)

        if [ -n "${gateway6}" ] && [ "${gateway6%/*}" = "${IFACE}" ]
        then
                ebegin "  Setting default gateway IPv6"
                # First delete any existing routes if it was setup by kernel ..
                /sbin/route -A inet6 del default dev ${gateway6%/*} &>/dev/null
                /sbin/route -A inet6 add default gw ${gateway6#*/} dev
${gateway6%/*} >/dev/null || {
                        local error=$?
                        ifconfig ${IFACE} down &>/dev/null
                        eend ${error} "Failed to bring ${IFACE} up (in IPv6 mode)"
                        stop
                        return ${error}
                }
                eend 0
        fi

the only need is to set the gateway6 variable, just like the gateway variable :)
Comment 1 Eric Shattow 2004-04-13 19:55:44 UTC
Created attachment 29243 [details, diff]
[PATCH] net.eth0 gateway6+bugfixes updated for baselayout 1.8.8

add ability to set ipv6 gateway with "gateway6" variable in /etc/conf.d/net and
also fixed a bug regarding the use of awk fields to parse inet6 route print
output.
Comment 2 Aron Griffis (RETIRED) gentoo-dev 2004-06-26 15:42:30 UTC
Hello Stefano,

This functionality is available as of baselayout-1.10 by using either the new-style ifconfig configuration or iproute2-style configuration.  In both cases it is possible to specify arbitrary routes, for example with the routes_eth0 array or the iproute_eth0 array (depending on which method you choose)

If you use these methods, it is unnecessary to set a gateway variable at all since you just specify the default gateway in the routes array.

Hope that helps.  Thanks for the bug.

Eric,

Thanks for the patches.  Caught the inet6 awk fields problem a while ago in a previous release...