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] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B79673B.7050908@trash.net>
Date:	Mon, 15 Feb 2010 16:24:43 +0100
From:	Patrick McHardy <kaber@...sh.net>
To:	"Michael S. Tsirkin" <mst@...hat.com>
CC:	"David S. Miller" <davem@...emloft.net>,
	Herbert Xu <herbert@...dor.apana.org.au>,
	Paul Moore <paul.moore@...com>,
	David Woodhouse <David.Woodhouse@...el.com>,
	Sridhar Samudrala <sri@...ibm.com>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] tun: socket filter support

Michael S. Tsirkin wrote:
> +	case TUNATTACHFILTER:
> +		/* Can be set only for TAPs */
> +		ret = -EINVAL;
> +		if ((tun->flags & TUN_TYPE_MASK) != TUN_TAP_DEV)
> +			break;
> +		ret = -EFAULT;
> +		if (copy_from_user(&fprog, argp, sizeof(fprog)))
> +			break;
> +
> +		ret = sk_attach_filter(&fprog, tun->socket.sk);
> +		break;
> +
> +	case TUNDETACHFILTER:
> +		/* Can be set only for TAPs */
> +		ret = -EINVAL;
> +		if ((tun->flags & TUN_TYPE_MASK) != TUN_TAP_DEV)
> +			break;
> +		ret = sk_detach_filter(tun->socket.sk);
> +		break;
> +

I'm not sure how the tun socket is exposed, but won't the regular
SO_ATTACH_FILTER/SO_DETACH_FILTER setsockopts already work for
tun sockets?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ