Bug 751165 - Tunnel Add problem in Fedora 15 since 2.6.40
Summary: Tunnel Add problem in Fedora 15 since 2.6.40
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 16
Hardware: x86_64
OS: Linux
high
urgent
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 756054
TreeView+ depends on / blocked
 
Reported: 2011-11-03 18:01 UTC by Goran Scuric
Modified: 2011-11-25 02:31 UTC (History)
6 users (show)

(edit)
Clone Of:
: 756054 (view as bug list)
(edit)
Last Closed: 2011-11-25 02:31:54 UTC


Attachments (Terms of Use)

Description Goran Scuric 2011-11-03 18:01:32 UTC
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

Comment 1 Goran Scuric 2011-11-04 00:23:28 UTC
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 ...

Comment 2 Ondrej Vasik 2011-11-04 06:11:11 UTC
Basesystem is just meta component with no content. As you stated problem is in kernel, reassigning there.

Comment 3 Josh Boyer 2011-11-09 19:40:01 UTC
(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.

Comment 4 Josh Boyer 2011-11-09 21:54:45 UTC
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 ~]#

Comment 5 Goran Scuric 2011-11-10 17:17:20 UTC
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@isi.edu


(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]#
==================

Comment 6 Josh Boyer 2011-11-11 00:22:39 UTC
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.

Comment 7 Josh Boyer 2011-11-11 01:04:22 UTC
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.

Comment 9 Josh Boyer 2011-11-14 18:59:48 UTC
Committed to F15-rawhide.

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

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

Comment 12 Fedora Update System 2011-11-25 02:31:54 UTC
kernel-3.1.2-1.fc16 has been pushed to the Fedora 16 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.