Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 6175 - BASELAYOUT: IPv6 Enhancement for net.eth0.
Summary: BASELAYOUT: IPv6 Enhancement for net.eth0.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on: 33310
Blocks:
  Show dependency tree
 
Reported: 2002-08-07 14:39 UTC by Asbjorn Sannes
Modified: 2004-04-17 08:49 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Asbjorn Sannes 2002-08-07 14:39:44 UTC
There is no "standard" way to set extra IPv6 (or a IPv6 address for that matter)
in the net.eth0 script. I've added this based on ip alias scripting. What it
does is to react upon inet6_{interface} (same way used for ip aliasing), so you
can add f.ex. "abcd:ef:abcd::e/64 abcd:ef:abcd::ef/64" and it will add it to the
interface:)

in start() add (after bringing the interface up) :
<cut>
    if [ -n "$(eval echo \$\{inet6_${IFACE}\})" ]
    then
        local x=""
        ebegin "  Adding inet6 addresses"
        for x in $(eval echo \$\{inet6_${IFACE}\})
        do
            ebegin "    ${IFACE} inet6 add ${x}"
            /sbin/ifconfig ${IFACE} inet6 add ${x} >/dev/null
            eend 0
        done
        save_options "inet6" "$(eval echo \$\{inet6_${IFACE}\})"
    fi
</cut>

In stop() add (at the very beginning):
<cut>
    local myinet6="$(get_options inet6)"
    if [ -n "${myinet6}" ]
    then
        local x=""
        for x in ${myinet6}
        do
            /sbin/ifconfig ${IFACE} inet6 del ${x} >/dev/null
        done
    fi
</cut>


If you have any questions don't hesitate to contact me, I'm currently working on
more stuff to make IPv6 in gentoo as painless as possible :)
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2002-08-25 02:51:05 UTC
Added to CVS, thanks!