* Re: [Bugme-new] [Bug 9806] New: (tun dev) Impossible to deassert IFF_ONE_QUEUE or IFF_NO_PI [not found] <bug-9806-10286@http.bugzilla.kernel.org/> @ 2008-01-24 8:33 ` Andrew Morton 2008-01-24 17:12 ` Nathaniel Filardo 0 siblings, 1 reply; 2+ messages in thread From: Andrew Morton @ 2008-01-24 8:33 UTC (permalink / raw) To: nwfilardo; +Cc: bugme-daemon, maxk, vtun, netdev > On Wed, 23 Jan 2008 13:13:13 -0800 (PST) bugme-daemon@bugzilla•kernel.org wrote: > http://bugzilla.kernel.org/show_bug.cgi?id=9806 > > Summary: (tun dev) Impossible to deassert IFF_ONE_QUEUE or > IFF_NO_PI > Product: Drivers > Version: 2.5 > KernelVersion: 2.6.23 > Platform: All > OS/Version: Linux > Tree: Mainline > Status: NEW > Severity: normal > Priority: P1 > Component: Network > AssignedTo: jgarzik@pobox•com > ReportedBy: nwfilardo@gmail•com > > > Problem Description: > > 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). > Thanks. Could you please submit the patch via email? Send it to all recipients of this email. ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Bugme-new] [Bug 9806] New: (tun dev) Impossible to deassert IFF_ONE_QUEUE or IFF_NO_PI 2008-01-24 8:33 ` [Bugme-new] [Bug 9806] New: (tun dev) Impossible to deassert IFF_ONE_QUEUE or IFF_NO_PI Andrew Morton @ 2008-01-24 17:12 ` Nathaniel Filardo 0 siblings, 0 replies; 2+ messages in thread From: Nathaniel Filardo @ 2008-01-24 17:12 UTC (permalink / raw) To: maxk, vtun, netdev [-- Attachment #1: Type: text/plain, Size: 330 bytes --] On Jan 24, 2008 3:33 AM, Andrew Morton <akpm@linux-foundation•org> wrote: > > On Wed, 23 Jan 2008 13:13:13 -0800 (PST) bugme-daemon@bugzilla•kernel.org wrote: > > http://bugzilla.kernel.org/show_bug.cgi?id=9806 > Thanks. Could you please submit the patch via email? Send it to > all recipients of this email. Attached. --nwf; [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: tun.patch --] [-- Type: text/x-diff; name=tun.patch, Size: 381 bytes --] --- tun.c.orig 2008-01-23 16:09:25.000000000 -0500 +++ tun.c 2008-01-23 16:12:26.000000000 -0500 @@ -540,9 +540,13 @@ if (ifr->ifr_flags & IFF_NO_PI) tun->flags |= TUN_NO_PI; + else + tun->flags &= ~TUN_NO_PI; if (ifr->ifr_flags & IFF_ONE_QUEUE) tun->flags |= TUN_ONE_QUEUE; + else + tun->flags &= ~TUN_ONE_QUEUE; file->private_data = tun; tun->attached = 1; ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-01-24 17:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <bug-9806-10286@http.bugzilla.kernel.org/>
2008-01-24 8:33 ` [Bugme-new] [Bug 9806] New: (tun dev) Impossible to deassert IFF_ONE_QUEUE or IFF_NO_PI Andrew Morton
2008-01-24 17:12 ` Nathaniel Filardo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox