Bug 756054 - Tunnel Add problem in Fedora 15 since 2.6.40
Summary: Tunnel Add problem in Fedora 15 since 2.6.40
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 15
Hardware: x86_64
OS: Linux
high
urgent
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 751165
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-22 15:47 UTC by Chuck Ebbert
Modified: 2011-12-10 19:50 UTC (History)
7 users (show)

Fixed In Version: kernel-2.6.41.4-1.fc15
Clone Of: 751165
Environment:
Last Closed: 2011-12-10 19:50:55 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Chuck Ebbert 2011-11-22 15:47:30 UTC
+++ This bug was initially created as a clone of Bug #751165 +++

Description of problem: the "ip -6 tunnel add" command creates a tunnel with wrong name of "ip6tnl%d", instead of "ip6tnl1". This was working in 2.6.38.
Stopped working in 2.6.40.x kernels ..

Version-Release number of selected component (if applicable):
Fedora 15 since 2.6.40.x kernel

How reproducible:
ip -6 tunnel add

Steps to Reproduce:
1.ip -6 tunnel add
2.ip -6 tunnel
3.
  
Actual results:
ip6tnl%d

Expected results:
ip6tnl1

Additional info:
was working in 2.6.38, it does NOT work in Fedora 16 either

--- Additional comment from scuric on 2011-11-03 20:23:28 EDT ---

The problem is in the kernel .../net/ipv6/ip6_tunnel.c file in tunnel create procedure  .... 

sprintf (buf, "ip6tnl%%d")

there should be only one percent sign at the end ...

--- Additional comment from ovasik on 2011-11-04 02:11:11 EDT ---

Basesystem is just meta component with no content. As you stated problem is in kernel, reassigning there.

--- Additional comment from jwboyer on 2011-11-09 14:40:01 EST ---

(In reply to comment #1)
> The problem is in the kernel .../net/ipv6/ip6_tunnel.c file in tunnel create
> procedure  .... 
> 
> sprintf (buf, "ip6tnl%%d")
> 
> there should be only one percent sign at the end ...

That has been like that since 2008.  It is supposed to trigger dev_alloc_name to fully resolve the name when the device is registered.  See commit 34cc7ba6.

So there is probably something else going on.

--- Additional comment from jwboyer on 2011-11-09 16:54:45 EST ---

Do you have some more thorough steps to recreate this issue?  I don't have any problems with the simple steps you listed:

[root@localhost ~]# ip -6 tunnel show
[root@localhost ~]# ip -6 tunnel add
[root@localhost ~]# ip -6 tunnel show
ip6tnl0: ipv6/ipv6 remote :: local :: encaplimit 0 hoplimit 0 tclass 0x00 flowlabel 0x00000 (flowinfo 0x00000000)
[root@localhost ~]# ip -6 tunnel
ip6tnl0: ipv6/ipv6 remote :: local :: encaplimit 0 hoplimit 0 tclass 0x00 flowlabel 0x00000 (flowinfo 0x00000000)
[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.40.6-0.fc15.x86_64 #1 SMP Tue Oct 4 00:39:50 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]#

--- Additional comment from scuric on 2011-11-10 12:17:20 EST ---

Hi, here are the snapshots of adding couple of tunnels in both good and bad kernels. I still strongly believe that all you need to do is remove the double percent sign in the ip6_tunnel.c. Double just does not make any sense. My guess is that Fedora fixed this in their private version in the 2.6.38 but never propagated the change into kernel.org. The next fedora used 2.6.40 out of kernel.org and forgot to fix it again.

We are heavily using the IPv6 and IPv6 tunneling, and we fixed other things in PERL libraries to make all work well. But this needs to be fixed in kernel.org trees. IT ALSO NEEDS TO BE FIXED FOR KERNEL 3.X !!!
If you need more info email me at scuric


(In the end there can be only one ..)

GOOD KERNEL:
[root@sin dynasat]#
[root@sin dynasat]# uname -a
Linux sin.isi.edu 2.6.38.6-26.rc1.fc15.x86_64 #1 SMP Mon May 9 20:45:15 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
[root@sin dynasat]#
[dynasat@sin ~]$ su
    Password:
[root@sin dynasat]# ip -6 tunnel show
[root@sin dynasat]#
[root@sin dynasat]# ip -6 tunnel add remote fec0::100 local fec0::200
[root@sin dynasat]#
[root@sin dynasat]# ip -6 tunnel show
    ip6tnl0: ipv6/ipv6 remote :: local :: encaplimit 0 hoplimit 0 tclass 0x00 flowlabel 0x00000 (flowinfo 0x00000000)
    ip6tnl1: ipv6/ipv6 remote fec0::100 local fec0::200 encaplimit 4 hoplimit 64 tclass 0x00 flowlabel 0x00000 (flowinfo 0x00000000)
[root@sin dynasat]#
[root@sin dynasat]# ip -6 tunnel add remote fec0::300 local fec0::400
[root@sin dynasat]#
[root@sin dynasat]# ip -6 tunnel show
ip6tnl0: ipv6/ipv6 remote :: local :: encaplimit 0 hoplimit 0 tclass 0x00 flowlabel 0x00000 (flowinfo 0x00000000)
ip6tnl1: ipv6/ipv6 remote fec0::100 local fec0::200 encaplimit 4 hoplimit 64 tclass 0x00 flowlabel 0x00000 (flowinfo 0x00000000)
ip6tnl2: ipv6/ipv6 remote fec0::300 local fec0::400 encaplimit 4 hoplimit 64 tclass 0x00 flowlabel 0x00000 (flowinfo 0x00000000)
[root@sin dynasat]# 

BAD KERNEL:
[root@div goran]#
[root@div goran]# uname -a
       Linux div.isi.edu 2.6.40.6-0.fc15.x86_64 #1 SMP Tue Oct 4 00:39:50 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
[root@div goran]#
[root@div goran]# ip -6 tunnel add
[root@div goran]#
[root@div goran]# ip -6 tunnel show
       ip6tnl0: ipv6/ipv6 remote :: local :: encaplimit 0 hoplimit 0 tclass 0x00 flowlabel 0x00000 (flowinfo 0x00000000)
[root@div goran]#
[root@div goran]# ip -6 tunnel add remote fec0::100 local fec0::200
[root@div goran]#
[root@div goran]# ip -6 tunnel show
        ip6tnl0: ipv6/ipv6 remote :: local :: encaplimit 0 hoplimit 0 tclass 0x00 flowlabel 0x00000 (flowinfo 0x00000000)
        ip6tnl%d: ipv6/ipv6 remote fec0::100 local fec0::200 encaplimit 4 hoplimit 64 tclass 0x00 flowlabel 0x00000 (flowinfo 0x00000000)
[root@div goran]#
[root@div goran]# ip -6 tunnel add remote fec0::300 local fec0::400
[root@div goran]#
[root@div goran]# ip -6 tunnel show
        ip6tnl0: ipv6/ipv6 remote :: local :: encaplimit 0 hoplimit 0 tclass 0x00 flowlabel 0x00000 (flowinfo 0x00000000)
        ip6tnl%d: ipv6/ipv6 remote fec0::100 local fec0::200 encaplimit 4 hoplimit 64 tclass 0x00 flowlabel 0x00000 (flowinfo 0x00000000)
        ip6tnl%d: ipv6/ipv6 remote fec0::300 local fec0::400 encaplimit 4 hoplimit 64 tclass 0x00 flowlabel 0x00000 (flowinfo 0x00000000)
[root@div goran]#
==================

--- Additional comment from jwboyer on 2011-11-10 19:22:39 EST ---

OK.  I think I have this figured out.  Commit 1c5cae815 was added in 3.0, and that removed a function call in ip6_tunnel.c that converted the ip6tnl%%d into a proper name.

I'm working on a patch right now.

--- Additional comment from jwboyer on 2011-11-10 20:04:22 EST ---

OK.  I tested the patch on a local f16 guest and the problem seems to be resolved:

Before, on the F16 GA kernel:

[root@localhost ~]# ip -6 tunnel add remote fec0::100 local fec0::200
[root@localhost ~]# ip -6 tunnel show
ip6tnl0: ipv6/ipv6 remote :: local :: encaplimit 0 hoplimit 0 tclass 0x00 flowlabel 0x00000 (flowinfo 0x00000000)
ip6tnl%d: ipv6/ipv6 remote fec0::100 local fec0::200 encaplimit 4 hoplimit 64 tclass 0x00 flowlabel 0x00000 (flowinfo 0x00000000)
[root@localhost ~]# 

With the patch:

[root@localhost ~]# uname -a
Linux localhost.localdomain 3.1.1-2.rc1.fc16.x86_64 #1 SMP Thu Nov 10 19:16:50 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]# ip -6 tunnel add remote fec0::100 local fec0::200
[root@localhost ~]# cat /proc/net/dev
Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
    lo:    1048      12    0    0    0     0          0         0     1048      12    0    0    0     0       0          0
  eth0:   22975     210    0    6    0     0          0         0    20727     155    0    0    0     0       0          0
ip6tnl0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
ip6tnl1:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
[root@localhost ~]# ip -6 tunnel show
ip6tnl0: ipv6/ipv6 remote :: local :: encaplimit 0 hoplimit 0 tclass 0x00 flowlabel 0x00000 (flowinfo 0x00000000)
ip6tnl1: ipv6/ipv6 remote fec0::100 local fec0::200 encaplimit 4 hoplimit 64 tclass 0x00 flowlabel 0x00000 (flowinfo 0x00000000)
[root@localhost ~]# 

I'll post this upstream for feedback.

--- Additional comment from jwboyer on 2011-11-10 20:11:36 EST ---

http://thread.gmane.org/gmane.linux.kernel/1214464

--- Additional comment from jwboyer on 2011-11-14 13:59:48 EST ---

Committed to F15-rawhide.

Comment 1 Fedora Update System 2011-11-22 16:19:55 UTC
kernel-2.6.41.2-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/kernel-2.6.41.2-1.fc15

Comment 2 Fedora Update System 2011-11-23 00:54:05 UTC
Package kernel-2.6.41.2-1.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing kernel-2.6.41.2-1.fc15'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-16243/kernel-2.6.41.2-1.fc15
then log in and leave karma (feedback).

Comment 3 Fedora Update System 2011-11-29 13:51:20 UTC
kernel-2.6.41.4-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/kernel-2.6.41.4-1.fc15

Comment 4 Fedora Update System 2011-11-30 02:02:53 UTC
Package kernel-2.6.41.4-1.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing kernel-2.6.41.4-1.fc15'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-16621/kernel-2.6.41.4-1.fc15
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2011-12-10 19:50:55 UTC
kernel-2.6.41.4-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.