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: <1378909915.21474.2.camel@edumazet-glaptop>
Date:	Wed, 11 Sep 2013 07:31:55 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Jozsef Kadlecsik <kadlec@...ckhole.kfki.hu>
Cc:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
	"V. Lavrov" <lve@...p.ru>
Subject: Re: [PATCH 1/1] net: sched: Make netns available for ematch
 extensions

On Wed, 2013-09-11 at 15:20 +0200, Jozsef Kadlecsik wrote:
> Ematch API (change, destroy) doesn't pass netns data to ematch extensions.
> This prevents adding netns support to ipset, which is an ematch too.
> 
> The patch adds the required pointer to "struct tcf_proto", thus
> making it available for every ematch.
> 
> Signed-off-by: Jozsef Kadlecsik <kadlec@...ckhole.kfki.hu>
> ---
>  include/net/sch_generic.h |    1 +
>  net/sched/cls_api.c       |    1 +
>  2 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
> index f4eb365..38e5e4b 100644
> --- a/include/net/sch_generic.h
> +++ b/include/net/sch_generic.h
> @@ -225,6 +225,7 @@ struct tcf_proto {
>  	struct Qdisc		*q;
>  	void			*data;
>  	const struct tcf_proto_ops	*ops;
> +	struct net		*net;
>  };
>  

Note that qdisc_dev(tp->q) should give you the pointer to device

Then ->nd_net gives you the struct net pointer.

On management path, this should be enough ;)





--
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