lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1248133495.5646.1066.camel@macbook.infradead.org>
Date:	Tue, 21 Jul 2009 00:44:55 +0100
From:	David Woodhouse <dwmw2@...radead.org>
To:	Stephen Hemminger <shemminger@...tta.com>
Cc:	netdev@...r.kernel.org
Subject: Re: [iproute2 patch]: Add 'ip tuntap' facility for managing
 tun/tap devices

On Sat, 2009-06-13 at 09:55 +0100, David Woodhouse wrote:
> On Thu, 2009-05-28 at 09:12 +0100, David Woodhouse wrote:
> > On Wed, 2009-05-27 at 21:58 -0700, Stephen Hemminger wrote:
> > > > +#define TUNDEV "/dev/net/tun"
> > > 
> > > I know this is historical legacy, but how does this play with
> > network namespaces?
> > 
> > For /dev/net/tun itself, it doesn't need to. The namespaces come into
> > play when you issue the TUNSETIFF ioctl to create/attach a particular
> > named device, which uses the network namespace of the process which
> > opened /dev/net/tun.
> >  
> > > > +static int tap_add_ioctl(struct ifreq *ifr, uid_t uid, gid_t gid)
> > > > +{
> > > > +   int fd = open(TUNDEV, O_RDWR);
> > > > +   int ret = -1;
> > > > +
> > > > +#ifndef IFF_TUN_EXCL
> > > > +#define IFF_TUN_EXCL       0x8000
> > > > +#endif
> > > 
> > > This shouldn't be here.
> > > It should be defined in include/linux/if_tun.h in kernel source
> > > and then a kernel sanitized version of if_tun.h should be put
> > > in iproute2 source for backwards compatibility.
> > 
> > I'm happy to do that; I was just taking my lead from the handling of
> > RTAX_RTTVAR, IP_DF, IPPROTO_SCTP, IPPPROTO_DCCP and IPPROTO_MH in
> > ip/*.c
> > 
> > >  But why bother it doesn't seem to be defined or used by current
> > kernel??
> > 
> > It's in net-next and is harmless in older kernels. It just means you
> > can't accidentally 'create' a device which already existed.
> > 
> > > Would prefer open() next to the test.
> > 
> > OK, moved.
> > 
> > > > +     while (argc > 0) {
> > > > +             if (strcmp(*argv, "mode") == 0) {
> > > 
> > > The argument parsing in ip commands uses matches() rather than
> > strcmp
> > > to allow for partial completion.  
> > 
> > OK. I had copied that part from 'ip tunnel', which uses strcmp().
> > 
> > New patch...
> 
> Ping?

Ping?

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@...el.com                              Intel Corporation

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ