<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/net/netfilter, 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-11-04T19:58:32Z</updated>
<entry>
<title>netfilter: nf_tables: Align nft_expr private data to 64-bit</title>
<updated>2019-11-04T19:58:32Z</updated>
<author>
<name>Lukas Wunner</name>
<email>lukas@wunner.de</email>
</author>
<published>2019-10-31T10:06:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=250367c59e6ba0d79d702a059712d66edacd4a1a'/>
<id>urn:sha1:250367c59e6ba0d79d702a059712d66edacd4a1a</id>
<content type='text'>
Invoking the following commands on a 32-bit architecture with strict
alignment requirements (such as an ARMv7-based Raspberry Pi) results
in an alignment exception:

 # nft add table ip test-ip4
 # nft add chain ip test-ip4 output { type filter hook output priority 0; }
 # nft add rule  ip test-ip4 output quota 1025 bytes

Alignment trap: not handling instruction e1b26f9f at [&lt;7f4473f8&gt;]
Unhandled fault: alignment exception (0x001) at 0xb832e824
Internal error: : 1 [#1] PREEMPT SMP ARM
Hardware name: BCM2835
[&lt;7f4473fc&gt;] (nft_quota_do_init [nft_quota])
[&lt;7f447448&gt;] (nft_quota_init [nft_quota])
[&lt;7f4260d0&gt;] (nf_tables_newrule [nf_tables])
[&lt;7f4168dc&gt;] (nfnetlink_rcv_batch [nfnetlink])
[&lt;7f416bd0&gt;] (nfnetlink_rcv [nfnetlink])
[&lt;8078b334&gt;] (netlink_unicast)
[&lt;8078b664&gt;] (netlink_sendmsg)
[&lt;8071b47c&gt;] (sock_sendmsg)
[&lt;8071bd18&gt;] (___sys_sendmsg)
[&lt;8071ce3c&gt;] (__sys_sendmsg)
[&lt;8071ce94&gt;] (sys_sendmsg)

The reason is that nft_quota_do_init() calls atomic64_set() on an
atomic64_t which is only aligned to 32-bit, not 64-bit, because it
succeeds struct nft_expr in memory which only contains a 32-bit pointer.
Fix by aligning the nft_expr private data to 64-bit.

Fixes: 96518518cc41 ("netfilter: add nftables")
Signed-off-by: Lukas Wunner &lt;lukas@wunner.de&gt;
Cc: stable@vger.kernel.org # v3.13+
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: nf_tables: bogus EBUSY when deleting flowtable after flush</title>
<updated>2019-09-25T09:01:19Z</updated>
<author>
<name>Laura Garcia Liebana</name>
<email>nevola@gmail.com</email>
</author>
<published>2019-09-24T12:42:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9b05b6e11d5e93a3a517cadc12b9836e0470c255'/>
<id>urn:sha1:9b05b6e11d5e93a3a517cadc12b9836e0470c255</id>
<content type='text'>
The deletion of a flowtable after a flush in the same transaction
results in EBUSY. This patch adds an activation and deactivation of
flowtables in order to update the _use_ counter.

Signed-off-by: Laura Garcia Liebana &lt;nevola@gmail.com&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: nf_tables: add NFT_CHAIN_POLICY_UNSET and use it</title>
<updated>2019-09-20T08:20:02Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2019-09-16T16:33:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ad652f3811d8644d547506154ec9a9c22c8771cd'/>
<id>urn:sha1:ad652f3811d8644d547506154ec9a9c22c8771cd</id>
<content type='text'>
Default policy is defined as a unsigned 8-bit field, do not use a
negative value to leave it unset, use this new NFT_CHAIN_POLICY_UNSET
instead.

Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: conntrack: remove two unused functions from nf_conntrack_timestamp.h.</title>
<updated>2019-09-13T10:48:09Z</updated>
<author>
<name>Jeremy Sowden</name>
<email>jeremy@azazel.net</email>
</author>
<published>2019-09-13T08:13:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0d32e7048d927418300b9f5415ca546e44621ef1'/>
<id>urn:sha1:0d32e7048d927418300b9f5415ca546e44621ef1</id>
<content type='text'>
Two inline functions defined in nf_conntrack_timestamp.h,
`nf_ct_tstamp_enabled` and `nf_ct_set_tstamp`, are not called anywhere.
Remove them.

Signed-off-by: Jeremy Sowden &lt;jeremy@azazel.net&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: conntrack: remove CONFIG_NF_CONNTRACK checks from nf_conntrack_zones.h.</title>
<updated>2019-09-13T10:47:41Z</updated>
<author>
<name>Jeremy Sowden</name>
<email>jeremy@azazel.net</email>
</author>
<published>2019-09-13T08:13:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1f1475f38b6830f40daa5d2e5290b926bcb63981'/>
<id>urn:sha1:1f1475f38b6830f40daa5d2e5290b926bcb63981</id>
<content type='text'>
nf_conntrack_zones.h was wrapped in a CONFIG_NF_CONNTRACK check in order
to fix compilation failures:

  37ee3d5b3e97 ("netfilter: nf_defrag_ipv4: fix compilation error with NF_CONNTRACK=n")

Subsequent changes mean that these failures will no longer occur and the
check is unnecessary.  Remove it.

Signed-off-by: Jeremy Sowden &lt;jeremy@azazel.net&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: remove CONFIG_NETFILTER checks from headers.</title>
<updated>2019-09-13T10:47:36Z</updated>
<author>
<name>Jeremy Sowden</name>
<email>jeremy@azazel.net</email>
</author>
<published>2019-09-13T08:13:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f19438bdd4bfbfdaac441034c1aaecf02c116e68'/>
<id>urn:sha1:f19438bdd4bfbfdaac441034c1aaecf02c116e68</id>
<content type='text'>
`struct nf_hook_ops`, `struct nf_hook_state` and the `nf_hookfn`
function typedef appear in function and struct declarations and
definitions in a number of netfilter headers.  The structs and typedef
themselves are defined by linux/netfilter.h but only when
CONFIG_NETFILTER is enabled.  Define them unconditionally and add
forward declarations in order to remove CONFIG_NETFILTER conditionals
from the other headers.

Signed-off-by: Jeremy Sowden &lt;jeremy@azazel.net&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: conntrack: remove CONFIG_NF_CONNTRACK check from nf_conntrack_acct.h.</title>
<updated>2019-09-13T10:47:18Z</updated>
<author>
<name>Jeremy Sowden</name>
<email>jeremy@azazel.net</email>
</author>
<published>2019-09-13T08:13:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=51a21be42ad8c2a343eb0d44813e38918b6a4df7'/>
<id>urn:sha1:51a21be42ad8c2a343eb0d44813e38918b6a4df7</id>
<content type='text'>
There is a superfluous `#if IS_ENABLED(CONFIG_NF_CONNTRACK)` check
wrapping some function declarations.  Remove it.

Signed-off-by: Jeremy Sowden &lt;jeremy@azazel.net&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: conntrack: move code to linux/nf_conntrack_common.h.</title>
<updated>2019-09-13T10:47:11Z</updated>
<author>
<name>Jeremy Sowden</name>
<email>jeremy@azazel.net</email>
</author>
<published>2019-09-13T08:13:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=261db6c2fbd64a2e649fdfa5f75cf161c384d110'/>
<id>urn:sha1:261db6c2fbd64a2e649fdfa5f75cf161c384d110</id>
<content type='text'>
Move some `struct nf_conntrack` code from linux/skbuff.h to
linux/nf_conntrack_common.h.  Together with a couple of helpers for
getting and setting skb-&gt;_nfct, it allows us to remove
CONFIG_NF_CONNTRACK checks from net/netfilter/nf_conntrack.h.

Signed-off-by: Jeremy Sowden &lt;jeremy@azazel.net&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: br_netfilter: update stub br_nf_pre_routing_ipv6 parameter to `void *priv`.</title>
<updated>2019-09-13T10:47:11Z</updated>
<author>
<name>Jeremy Sowden</name>
<email>jeremy@azazel.net</email>
</author>
<published>2019-09-13T08:13:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f1815650b547db745bef35f74395e113fcf62cac'/>
<id>urn:sha1:f1815650b547db745bef35f74395e113fcf62cac</id>
<content type='text'>
The real br_nf_pre_routing_ipv6 function, defined when CONFIG_IPV6 is
enabled, expects `void *priv`, not `const struct nf_hook_ops *ops`.
Update the stub br_nf_pre_routing_ipv6, defined when CONFIG_IPV6 is
disabled, to match.

Fixes: 06198b34a3e0 ("netfilter: Pass priv instead of nf_hook_ops to netfilter hooks")
Signed-off-by: Jeremy Sowden &lt;jeremy@azazel.net&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: conntrack: wrap two inline functions in config checks.</title>
<updated>2019-09-13T10:47:10Z</updated>
<author>
<name>Jeremy Sowden</name>
<email>jeremy@azazel.net</email>
</author>
<published>2019-09-13T08:13:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=22e81d7416d04355a7dfa248f187feba641c199e'/>
<id>urn:sha1:22e81d7416d04355a7dfa248f187feba641c199e</id>
<content type='text'>
nf_conntrack_synproxy.h contains three inline functions.  The contents
of two of them are wrapped in CONFIG_NETFILTER_SYNPROXY checks and just
return NULL if it is not enabled.  The third does nothing if they return
NULL, so wrap its contents as well.

nf_ct_timeout_data is only called if CONFIG_NETFILTER_TIMEOUT is
enabled.  Wrap its contents in a CONFIG_NETFILTER_TIMEOUT check like the
other inline functions in nf_conntrack_timeout.h.

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