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: <485F7C54.5070506@trash.net>
Date:	Mon, 23 Jun 2008 12:35:00 +0200
From:	Patrick McHardy <kaber@...sh.net>
To:	Alexey Dobriyan <adobriyan@...il.com>
CC:	netdev@...r.kernel.org, netfilter-devel@...r.kernel.org,
	den@...nvz.org, xemul@...nvz.org, ebiederm@...ssion.com,
	benjamin.thery@...l.net, dlezcano@...ibm.com
Subject: Re: [PATCH 09/25] netns ct: get proper netns from netdevice

Alexey Dobriyan wrote:
> Get netns from skb->dev on input, from skb->dst->dev on output to know
> where to create or search for conntrack.
> 
> Is there some documentation re which device accessible from skb is valid
> at which point?

For netfilter hooks, skb->dev points to the input device in
PREROUTING, INPUT, FORWARD, to the output device in POSTROUTING
and is invalid in OUTPUT.

> @@ -626,10 +628,14 @@ resolve_normal_ct(struct sk_buff *skb,
>  		return NULL;
>  	}
>  
> +	dev = skb->dev;
> +	if (!dev)
> +		dev = skb->dst->dev;
> +	net = dev_net(dev);

Maybe just pass it though nf_conntrack_in from the hook functions,
those get the devices as arguments.
--
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