Bug 490796

Summary: Extraneous addresses on tun6to4 interface
Product: [Fedora] Fedora Reporter: Allen Kistler <ackistler>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: iarlyy, notting, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-03-28 21:43:35 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: 490810    
Attachments:
Description Flags
Patch for /etc/sysconfig/network-scripts/network-functions-ipv6 none

Description Allen Kistler 2009-03-18 04:53:11 UTC
Created attachment 335651 [details]
Patch for /etc/sysconfig/network-scripts/network-functions-ipv6

Description of problem:
Extraneous "IPv4-compatible" (which is deprecated in IPv6) and "unknown" (which is the IPv4 loopback) scope addresses are assigned to the 6to4 tunnel interface.  They shouldn't be.

Version-Release number of selected component (if applicable):
initscripts-8.90-1.i586

How reproducible:
Always

Steps to Reproduce:
1. Configure 6to4 on an interface (e.g., eth0)
2. Bounce the interface (ifdown eth0 ; ifup eth0)
3. Look at the tunnel (ifconfig tun6to4)
  
Actual results:
tun6to4   Link encap:IPv6-in-IPv4  
          inet6 addr: 2002:101:102::1/16 Scope:Global
          inet6 addr: ::1.1.1.2/96 Scope:Compat
          inet6 addr: ::127.0.0.1/96 Scope:Unknown

(...for an Ethernet address of 1.1.1.2, e.g.)

Expected results:
tun6to4   Link encap:IPv6-in-IPv4  
          inet6 addr: 2002:101:102::1/16 Scope:Global

Additional info:
When setting up a 6to4 tunnel, an updated (relative to F9, anyway) /sbin/ip adds more addresses to tun6to4 when it comes up.  Ordinarily ifup-ipv6 and network-functions-ipv6 remove one of them, but the F11-Alpha /sbin/ip adds more than previous (F9, at least) did.

A simple patch to network-functions-ipv6 (attached) fixes this bug and should increase the script's robustness even if /sbin/ip's behavior is remedied or changed.  (I'll file a separate bug report against iproute for /sbin/ip.)

Note that the ifup-ipv6/network-functions-ipv6 code in the current F11-Alpha that attempts to remove the IPv4 address associated with the physical device from tun6to4 fails with an error.  (I'll submit a separate bug report against initscripts for that one, too.)

Comment 1 Allen Kistler 2009-03-18 05:11:12 UTC
FWIW, it's even worse if there are multiple Ethernet interfaces.  With IPv4 interfaces 172.16.9.7 and 1.1.1.2, tun6to4 looks like ...

tun6to4   Link encap:IPv6-in-IPv4  
          inet6 addr: 2002:101:102::1/16 Scope:Global
          inet6 addr: ::1.1.1.2/96 Scope:Compat
          inet6 addr: ::172.16.9.7/96 Scope:Compat
          inet6 addr: ::127.0.0.1/96 Scope:Unknown

The previously attached patch works in this case, too.

Comment 2 Bill Nottingham 2009-03-18 16:48:11 UTC
Can you CC me on the /sbin/ip bug? That really sounds like the right place to fix this behavior.

Comment 3 Allen Kistler 2009-03-18 19:23:55 UTC
Done.  For the reference of others, the /sbin/ip report is Bug 490981.

What I've done on my own machine is apply the patch I supplied in this report and the "option 2" patch I supplied in Bug 490810.  Either one gets the job done, plus the "option 2" patch from Bug 490810 works even if /sbin/ip adds only the "correct" autotunnel address, but with a different netmask.  The two patches I'm using are the ones that make the fewest assumptions that anything else was done correctly.  As long as it all works eventually without any local customization, I won't argue too hard.

Comment 4 iarly selbir 2009-03-19 21:06:54 UTC
Triaged.

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 5 Allen Kistler 2009-03-26 00:37:47 UTC
I got impatient and snagged kernel-2.6.29-2.fc11.i586 out of koji, which is the fix for Bug 490981.  (I figured the alternative was to wait another week until the beta would be released.)

With Bug 490981 fixed, this bug no longer exists.  I'll close it once the fix for Bug 490981 hits rawhide.

Comment 6 Allen Kistler 2009-03-28 21:43:35 UTC
Fixed via rawhide kernel-2.6.29-16.fc11.  Closing.