All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Brower <ebrower@gmail.com>
To: sparclinux@vger.kernel.org
Subject: Re: TUNSETIFF: data not copied back to userspace
Date: Mon, 14 Feb 2005 20:45:27 +0000	[thread overview]
Message-ID: <ec7cefb0502141245151c1cec@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0502141928510.11663@l01.thnet>

Take a look at the dev_ifsioc() function in ioctl32.c-- it does not
copy the data back to userspace except for SIOCSIFMAP, and judging
from the strict definition of TUNSETIFF it should not be required to
do so.

I think if this is functionality that is required (I see no TUNGETIFF,
but I don't play with this stuff enough to know) the directionality of
the ioctl definition should be _IOWR rather than _IOR; in any case,
the "argument" field should  not be "int" but rather "struct ifreq*"
in if_tun.h.  Likely, neither will change for historical reasons....

E


On Mon, 14 Feb 2005 20:41:33 +0100 (CET), Michael Tautschnig
<michael.tautschnig@zt-consulting.com> wrote:
> Hello!
> 
> Thanks for the information regarding userland/kernelspace - I think I
> understood ...
> 
> The reason of my question were problems using the tun/tap interface - I've
> got an application (namely l2tpns) demanding the ifreq-structure being
> copied back to userspace - which AFAIK doesn't happen in case of the
> TUNSETIFF-ioctl. Is this a bug or are there any reasons why this shouldn't
> happen in dev_ifsioc ?
> 
> Thanks,
> Michael
> 
> -
> To unsubscribe from this list: send the line "unsubscribe sparclinux" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


-- 
E

  reply	other threads:[~2005-02-14 20:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-14 19:41 TUNSETIFF: data not copied back to userspace Michael Tautschnig
2005-02-14 20:45 ` Eric Brower [this message]
2005-02-14 22:59 ` Michael Tautschnig
2005-02-14 23:02 ` David S. Miller
2005-02-14 23:18 ` Michael Tautschnig
2005-02-14 23:30 ` David S. Miller

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=ec7cefb0502141245151c1cec@mail.gmail.com \
    --to=ebrower@gmail.com \
    --cc=sparclinux@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.