<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/netfilter/nf_queue.c, branch v5.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.4</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-07-09T02:48:57Z</updated>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2019-07-09T02:48:57Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2019-07-09T02:48:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=af144a983402f7fd324ce556d9f9011a8b3e01fe'/>
<id>urn:sha1:af144a983402f7fd324ce556d9f9011a8b3e01fe</id>
<content type='text'>
Two cases of overlapping changes, nothing fancy.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netfilter: nf_queue: remove unused hook entries pointer</title>
<updated>2019-07-04T00:29:49Z</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2019-07-02T18:41:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0d9cb300acad29f25ea23d2592e69970bc61f14c'/>
<id>urn:sha1:0d9cb300acad29f25ea23d2592e69970bc61f14c</id>
<content type='text'>
Its not used anywhere, so remove this.

Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>net: make skb_dst_force return true when dst is refcounted</title>
<updated>2019-06-29T18:01:35Z</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2019-06-26T18:40:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b60a77386b1d4868f72f6353d35dabe5fbe981f2'/>
<id>urn:sha1:b60a77386b1d4868f72f6353d35dabe5fbe981f2</id>
<content type='text'>
netfilter did not expect that skb_dst_force() can cause skb to lose its
dst entry.

I got a bug report with a skb-&gt;dst NULL dereference in netfilter
output path.  The backtrace contains nf_reinject(), so the dst might have
been cleared when skb got queued to userspace.

Other users were fixed via
if (skb_dst(skb)) {
	skb_dst_force(skb);
	if (!skb_dst(skb))
		goto handle_err;
}

But I think its preferable to make the 'dst might be cleared' part
of the function explicit.

In netfilter case, skb with a null dst is expected when queueing in
prerouting hook, so drop skb for the other hooks.

v2:
 v1 of this patch returned true in case skb had no dst entry.
 Eric said:
   Say if we have two skb_dst_force() calls for some reason
   on the same skb, only the first one will return false.

 This now returns false even when skb had no dst, as per Erics
 suggestion, so callers might need to check skb_dst() first before
 skb_dst_force().

Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netfilter: nf_queue: fix reinject verdict handling</title>
<updated>2019-05-21T14:10:30Z</updated>
<author>
<name>Jagdish Motwani</name>
<email>jagdish.motwani@sophos.com</email>
</author>
<published>2019-05-13T18:17:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=946c0d8e6ed43dae6527e878d0077c1e11015db0'/>
<id>urn:sha1:946c0d8e6ed43dae6527e878d0077c1e11015db0</id>
<content type='text'>
This patch fixes netfilter hook traversal when there are more than 1 hooks
returning NF_QUEUE verdict. When the first queue reinjects the packet,
'nf_reinject' starts traversing hooks with a proper hook_index. However,
if it again receives a NF_QUEUE verdict (by some other netfilter hook), it
queues the packet with a wrong hook_index. So, when the second queue
reinjects the packet, it re-executes hooks in between.

Fixes: 960632ece694 ("netfilter: convert hook list to an array")
Signed-off-by: Jagdish Motwani &lt;jagdish.motwani@sophos.com&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>bridge: netfilter: unroll NF_HOOK helper in bridge input path</title>
<updated>2019-04-11T23:47:39Z</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2019-04-11T14:36:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=971502d77faa50a37c89bc6d172450294ad9a5fd'/>
<id>urn:sha1:971502d77faa50a37c89bc6d172450294ad9a5fd</id>
<content type='text'>
Replace NF_HOOK() based invocation of the netfilter hooks with a private
copy of nf_hook_slow().

This copy has one difference: it can return the rx handler value expected
by the stack, i.e. RX_HANDLER_CONSUMED or RX_HANDLER_PASS.

This is needed by the next patch to invoke the ebtables
"broute" table via the standard netfilter hooks rather than the custom
"br_should_route_hook" indirection that is used now.

When the skb is to be "brouted", we must return RX_HANDLER_PASS from the
bridge rx input handler, but there is no way to indicate this via
NF_HOOK(), unless perhaps by some hack such as exposing bridge_cb in the
netfilter core or a percpu flag.

  text    data     bss     dec   filename
  3369      56       0    3425   net/bridge/br_input.o.before
  3458      40       0    3498   net/bridge/br_input.o.after

This allows removal of the "br_should_route_hook" in the next patch.

Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Acked-by: Nikolay Aleksandrov &lt;nikolay@cumulusnetworks.com&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: avoid using skb-&gt;nf_bridge directly</title>
<updated>2018-12-19T19:21:37Z</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2018-12-18T16:15:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c4b0e771f906f5beb7d90c3d28fe55ff9dbd038c'/>
<id>urn:sha1:c4b0e771f906f5beb7d90c3d28fe55ff9dbd038c</id>
<content type='text'>
This pointer is going to be removed soon, so use the existing helpers in
more places to avoid noise when the removal happens.

Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netfilter: remove duplicated include</title>
<updated>2018-01-10T14:32:15Z</updated>
<author>
<name>Wei Yongjun</name>
<email>weiyongjun1@huawei.com</email>
</author>
<published>2018-01-10T13:06:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=99eadf67c8fe0d9ebe5f4a2b1551d8238b4a43bf'/>
<id>urn:sha1:99eadf67c8fe0d9ebe5f4a2b1551d8238b4a43bf</id>
<content type='text'>
Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: remove route_key_size field in struct nf_afinfo</title>
<updated>2018-01-08T17:11:01Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2017-11-27T21:58:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=464356234f88518f7d0678b979013e78607e8266'/>
<id>urn:sha1:464356234f88518f7d0678b979013e78607e8266</id>
<content type='text'>
This is only needed by nf_queue, place this code where it belongs.

Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: move reroute indirection to struct nf_ipv6_ops</title>
<updated>2018-01-08T17:10:53Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2017-11-27T21:50:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ce388f452f0af2013c657dd24be4415d94e7704f'/>
<id>urn:sha1:ce388f452f0af2013c657dd24be4415d94e7704f</id>
<content type='text'>
We cannot make a direct call to nf_ip6_reroute() because that would result
in autoloading the 'ipv6' module because of symbol dependencies.
Therefore, define reroute indirection in nf_ipv6_ops where this really
belongs to.

For IPv4, we can indeed make a direct function call, which is faster,
given IPv4 is built-in in the networking code by default. Still,
CONFIG_INET=n and CONFIG_NETFILTER=y is possible, so define empty inline
stub for IPv4 in such case.

Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: remove saveroute indirection in struct nf_afinfo</title>
<updated>2018-01-08T17:01:25Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2017-12-20T15:12:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7db9a51e0f9931446ed4231feb1040ed5134fc60'/>
<id>urn:sha1:7db9a51e0f9931446ed4231feb1040ed5134fc60</id>
<content type='text'>
This is only used by nf_queue.c and this function comes with no symbol
dependencies with IPv6, it just refers to structure layouts. Therefore,
we can replace it by a direct function call from where it belongs.

Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
</feed>
