From: David Miller <davem@davemloft.net>
To: akpm@linux-foundation.org
Cc: netdev@vger.kernel.org, nwfilardo@gmail.com, jeff@garzik.org,
maxk@qualcomm.com
Subject: Re: [patch 2/2] tun: impossible to deassert IFF_ONE_QUEUE or IFF_NO_PI
Date: Tue, 05 Feb 2008 03:05:47 -0800 (PST) [thread overview]
Message-ID: <20080205.030547.156453415.davem@davemloft.net> (raw)
In-Reply-To: <200802050745.m157j2vh010306@imap1.linux-foundation.org>
From: akpm@linux-foundation.org
Date: Mon, 04 Feb 2008 23:45:21 -0800
> From: "Nathaniel Filardo" <nwfilardo@gmail.com>
>
> Taken from http://bugzilla.kernel.org/show_bug.cgi?id=9806
>
> The TUN/TAP driver only permits one-way transitions of IFF_NO_PI or
> IFF_ONE_QUEUE during the lifetime of a tap/tun interface. Note that
> tun_set_iff contains
>
> 541 if (ifr->ifr_flags & IFF_NO_PI)
> 542 tun->flags |= TUN_NO_PI;
> 543
> 544 if (ifr->ifr_flags & IFF_ONE_QUEUE)
> 545 tun->flags |= TUN_ONE_QUEUE;
>
> This is easily fixed by adding else branches which clear these bits.
>
> Steps to reproduce:
>
> This is easily reproduced by setting an interface persistant using tunctl then
> attempting to open it as IFF_TAP or IFF_TUN, without asserting the IFF_NO_PI
> flag. The ioctl() will succeed and the ifr.flags word is not modified, but the
> interface remains in IFF_NO_PI mode (as it was set by tunctl).
>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Jeff Garzik <jeff@garzik.org>
> Acked-by: Maxim Krasnyansky <maxk@qualcomm.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Applied.
prev parent reply other threads:[~2008-02-05 11:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-05 7:45 [patch 2/2] tun: impossible to deassert IFF_ONE_QUEUE or IFF_NO_PI akpm
2008-02-05 11:05 ` David Miller [this message]
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=20080205.030547.156453415.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=akpm@linux-foundation.org \
--cc=jeff@garzik.org \
--cc=maxk@qualcomm.com \
--cc=netdev@vger.kernel.org \
--cc=nwfilardo@gmail.com \
/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