Netdev List
 help / color / mirror / Atom feed
From: "Bruno Clermont" <bruno.clermont@canoe.ca>
To: netdev@vger.kernel.org
Subject: Fwd: Bug with tun0 and VLAN
Date: Mon, 29 Oct 2007 21:11:44 -0400	[thread overview]
Message-ID: <ef1197770710291811l7057f71y5207c2689b847e7b@mail.gmail.com> (raw)
In-Reply-To: <47267AEB.90506@qualcomm.com>

Hi,

I previously contacted tun driver maintainer about a bug I found and
he suggested me to forward this to you.
so, look like there is a bug in the kernel when the VLAN code is
dealing with an interface like the tun interface.

see forwarded my original mail and Max reply.

thanks!

---------- Forwarded message ----------
From: Max Krasnyansky <maxk@qualcomm.com>
Date: Oct 29, 2007 8:29 PM
Subject: Re: Bug with tun0 and VLAN
To: Bruno Clermont <bruno.clermont@gmail.com>

Hi Bruno,

> Hi,
>
> I'm writing to you, because you seem to be the maintainer of the tun driver.
>
> I hit a bug lately. I was testing this scenario:
>
> [Server1][eth0]-------(Internet)----------[eth0][Server2]
>
> I want to be able to route traffic for many VLAN into a single tunnel
> instead of invoking 1 openvpn process per VLAN. so, I tried to add VLAN
> to tun interface.
>
> I create an OpenVPN tunnel between Server1 and 2, this part work. the
> tun0 is going up. I use heavily openvpn and I'm sure of me on this part.
> I made sure openvpn did not set any IP on the tunnel.
>
> So, I added the vlan to the tun interface on both server:
>
> ifconfig tun0 up
> vconfig add tun0 1
> vconfig add tun1 2
>
> on server1:
> ifconfig tun0.1 10.0.0.1 <http://10.0.0.1> netmask 255.255.255.0
> <http://255.255.255.0> up
> ifconfig tun0.1 10.0.1.1 <http://10.0.1.1> netmask 255.255.255.0
> <http://255.255.255.0> up
>
> on server2:
> ifconfig tun0.1 10.0.0.2 <http://10.0.0.2> netmask 255.255.255.0
> <http://255.255.255.0> up
> ifconfig tun0.1 10.0.1.2 <http://10.0.1.2> netmask 255.255.255.0
> <http://255.255.255.0> up
>
> Trying to ping the other end of the tun/vlan make the kernel panic on
> the host that try to ping.
> I tried on Ubuntu Feisty and Gutsy (2.6.22) and they both crash.
>
> I tried it severals times on different host and it seem that combining
> VLAN and tun interface crash the kernel.
> it's easy to reproduce.
>
> Is it a tun driver issue? VLAN code issue? some other part of the
> kernel? I don't know.
>
> your my first attempt of communication for this issue... If it's not
> supported, at least the kernel should not panic!

Actually TUN is a point to point device, it does not have Ethernet MAC
headers. In other words VLANs would never work over TUN.
I agree though that it should not crash. So it's better to report this to
netdev mailing list. Basically VLAN code should outright refuse to attach
to TUN devices.

Max

           reply	other threads:[~2007-10-30  1:11 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <47267AEB.90506@qualcomm.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ef1197770710291811l7057f71y5207c2689b847e7b@mail.gmail.com \
    --to=bruno.clermont@canoe.ca \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox