Bug 168904

Summary: ifup-ipv6 should assign static addresses when using IPV6TO4_ROUTING
Product: [Fedora] Fedora Reporter: Matt Domsch <matt_domsch>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: denis, pb, pekkas, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 8.43-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-10-12 16:38:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 150221    
Attachments:
Description Flags
ifup-ipv6.patch
none
Patch to fix/enhance 6to4 setup as well as other fixes none

Description Matt Domsch 2005-09-21 03:42:30 UTC
Description of problem:
When using IPV6TO4_ROUTING on a public interface (say public0), as such:
  IPV6TO4_ROUTING="eth1-:110::/64 eth2-:111::/64"
it doesn't create addresses on these new subnet numbers on eth1 or eth2, so all
they've got is their link address.  They really should have a publicly routable
address in this case, yes?  (see http://linux.yyz.us/ipv6-fc2-howto.html for the
example I'm drawing this from.  It creates the new route, and assigns a new
address on the interface too.)

Version-Release number of selected component (if applicable):
initscripts-8.14 and earlier

How reproducible:
always

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Matt Domsch 2005-09-21 03:42:31 UTC
Created attachment 119062 [details]
ifup-ipv6.patch

Comment 2 Pekka Savola 2005-09-21 04:53:49 UTC
A couple of first thoughts,

This has been discussed when developing the scripts, but for some reason it
wasn't implemented way back when.  Peter, can you remember the reason?

The patch assumes that you want to assign the interface-ID 1 to these networks,
which is probably OK in this particular case.

I'm not sure if the addresses would need to be deleted from the interfaces when
shutting down..

Comment 3 Peter Bieringer 2005-09-21 08:44:17 UTC
This issue is known, but like Pekka already mentioned, the problem is the
deletion of the addresses in case 6to4 shuts down (e.g. by ip-down triggered by
ppp hangup). Because up/down is stateless it cannot remember, which address was
set on ifup-ipv6.

It can be a solution to remove all assigned 2002::/16 addresses of an interface
in ifdown-ipv6, because we already remove already all link routes set on ifup-ipv6.

part of ifdown-ipv6:

# Shutdown of 6to4, if configured
if [ "$valid6to4config" = "yes" ]; then
        if [ -n "$IPV6TO4_ROUTING" ]; then
                # Delete routes to local networks
                for devsuf in $IPV6TO4_ROUTING; do
                        dev="`echo $devsuf | awk -F- '{ print $1 }'`"
                        ipv6_cleanup_routes $dev ::

->>>                    # TODO: here delete also 2002::/16 addresses of $dev
  
                done
        fi

        # Delete all configured 6to4 address
        ipv6_cleanup_6to4_tunnels tun6to4
     ...

I will implement this next days and send a patch afterwards. Further discussions
at the meanwhile on maillist initscripts-ipv6 - ok?

For the given patch for ifup-ipv6 and the suffix ::1 I will take a look, perhaps
we can add an optional variable (::1 is good for default).


Comment 4 Peter Bieringer 2005-09-22 12:59:55 UTC
Could you try attached patch. It changes from route to address configuration
according to information given in IPV6TO4_ROUTING.

You only have to change your setup from
 IPV6TO4_ROUTING="eth1-:110::/64 eth2-:111::/64"
to
 IPV6TO4_ROUTING="eth1-:110::1/64 eth2-:111::1/64"

The patch is against current iniscripts-cvs version and contain also minor
additional fixes as well as a major fix for currently not working
'ipv6_cleanup_routes' (introduced some time ago by me...)

Also it adds support for rfc3041 config.

Comment 5 Peter Bieringer 2005-09-22 13:01:47 UTC
Created attachment 119132 [details]
Patch to fix/enhance 6to4 setup as well as other fixes

Comment 6 Matt Domsch 2005-09-24 03:35:43 UTC
Patch looks good to me, thanks.

Comment 7 Matt Domsch 2006-10-12 16:38:43 UTC
Fixed sometime in the last year in 8.43-1 or earlier.