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

Bug 34653

Summary: Modified init.d/net.eth0 && conf.d/net to support static IPv6 network
Product: Gentoo Linux Reporter: Stefano Balocco <Stefano>
Component: [OLD] baselayoutAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal CC: alpeterson, ipv6
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 33310    
Bug Blocks:    
Attachments: [PATCH] net.eth0 gateway6+bugfixes updated for baselayout 1.8.8

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...