public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: "Martín Ferrari" <martin.ferrari@gmail.com>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: Problem with tun driver
Date: Thu, 16 Sep 2010 06:16:32 -0700	[thread overview]
Message-ID: <m1iq256d73.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <AANLkTinzLJia4WV-GUse0sX=3Ht8DrD-vVd3YkxUE8xO@mail.gmail.com> ("Martín Ferrari"'s message of "Thu, 16 Sep 2010 10:30:42 +0200")

Martín Ferrari <martin.ferrari@gmail.com> writes:

> (copying Eric as he seems to have been writing patches for tun to work
> with netns)
>
> Hello,
>
> I am seeing a strange behaviour with the TUN driver when using it
> inside a network name space, hope that somebody can help me...
>
> I still couldn' t reproduce this problem outside of my program, so it
> complicates things more. What I am doing is creating a tap device,
> moving it into a namespace and then passing the filedescriptor to
> another process which in turn starts reading from it.
>
> From strace I see that many reads succeed (Ipv6 autoconfig and arp
> requests), and at some point, read returns EBADF. I don't see the
> other processes doing anything suspicious on it at the same time. From
> reading the kernel sources, it seems to be failing the call to
> tun_get(), but I don' t understand how that could be happening...

Is it possible all of the processes in the network namespace you have
passed the tun dev into are dying, and thus destroying the network
namespace the tun dev is in?

It sounds like you are dealing with the network namespace death case,
or that someone is closing your filedescriptor on you.

Eric

  reply	other threads:[~2010-09-16 13:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-16  8:30 Problem with tun driver Martín Ferrari
2010-09-16 13:16 ` Eric W. Biederman [this message]
2010-09-16 13:23   ` Martín Ferrari
2010-09-16 13:16 ` Eric W. Biederman

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=m1iq256d73.fsf@fess.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=martin.ferrari@gmail.com \
    --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