<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/netfilter, branch v4.7</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=v4.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-07-12T14:28:41Z</updated>
<entry>
<title>netfilter: conntrack: skip clash resolution if nat is in place</title>
<updated>2016-07-12T14:28:41Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2016-07-11T15:28:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=590b52e10d410e1439ae86be9fe19d75fdab628b'/>
<id>urn:sha1:590b52e10d410e1439ae86be9fe19d75fdab628b</id>
<content type='text'>
The clash resolution is not easy to apply if the NAT table is
registered. Even if no NAT rules are installed, the nul-binding ensures
that a unique tuple is used, thus, the packet that loses race gets a
different source port number, as described by:

http://marc.info/?l=netfilter-devel&amp;m=146818011604484&amp;w=2

Clash resolution with NAT is also problematic if addresses/port range
ports are used since the conntrack that wins race may describe a
different mangling that we may have earlier applied to the packet via
nf_nat_setup_info().

Fixes: 71d8c47fc653 ("netfilter: conntrack: introduce clash resolution on insertion race")
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
Tested-by: Marc Dionne &lt;marc.c.dionne@gmail.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'ipvs-fixes2-for-v4.7' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs</title>
<updated>2016-07-11T09:58:33Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2016-07-11T09:55:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4edfa9d0bf9ee9c34ee58b80ea1f146677497de9'/>
<id>urn:sha1:4edfa9d0bf9ee9c34ee58b80ea1f146677497de9</id>
<content type='text'>
Simon Horman says:

====================
Second Round of IPVS Fixes for v4.7

The fix from Quentin Armitage allows the backup sync daemon to
be bound to a link-local mcast IPv6 address as is already the case
for IPv4.
====================

Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: nft_ct: fix expiration getter</title>
<updated>2016-07-08T12:55:14Z</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2016-07-06T12:53:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c8607e020014cf11a61601a0005270bad81cabdf'/>
<id>urn:sha1:c8607e020014cf11a61601a0005270bad81cabdf</id>
<content type='text'>
We need to compute timeout.expires - jiffies, not the other way around.
Add a helper, another patch can then later change more places in
conntrack code where we currently open-code this.

Will allow us to only change one place later when we remove per-ct timer.

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>ipvs: fix bind to link-local mcast IPv6 address in backup</title>
<updated>2016-07-07T18:21:32Z</updated>
<author>
<name>Quentin Armitage</name>
<email>quentin@armitage.org.uk</email>
</author>
<published>2016-06-16T07:00:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3777ed688fba82d0bd43f9fc1ebbc6abe788576d'/>
<id>urn:sha1:3777ed688fba82d0bd43f9fc1ebbc6abe788576d</id>
<content type='text'>
When using HEAD from
https://git.kernel.org/cgit/utils/kernel/ipvsadm/ipvsadm.git/,
the command:
ipvsadm --start-daemon backup --mcast-interface eth0.60 \
    --mcast-group ff02::1:81
fails with the error message:
Argument list too long

whereas both:
ipvsadm --start-daemon master --mcast-interface eth0.60 \
    --mcast-group ff02::1:81
and:
ipvsadm --start-daemon backup --mcast-interface eth0.60 \
    --mcast-group 224.0.0.81
are successful.

The error message "Argument list too long" isn't helpful. The error occurs
because an IPv6 address is given in backup mode.

The error is in make_receive_sock() in net/netfilter/ipvs/ip_vs_sync.c,
since it fails to set the interface on the address or the socket before
calling inet6_bind() (via sock-&gt;ops-&gt;bind), where the test
'if (!sk-&gt;sk_bound_dev_if)' failed.

Setting sock-&gt;sk-&gt;sk_bound_dev_if on the socket before calling
inet6_bind() resolves the issue.

Fixes: d33288172e72 ("ipvs: add more mcast parameters for the sync daemon")
Signed-off-by: Quentin Armitage &lt;quentin@armitage.org.uk&gt;
Acked-by: Julian Anastasov &lt;ja@ssi.bg&gt;
Signed-off-by: Simon Horman &lt;horms@verge.net.au&gt;
</content>
</entry>
<entry>
<title>netfilter: conntrack: avoid integer overflow when resizing</title>
<updated>2016-07-01T14:02:33Z</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2016-04-23T23:18:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9cc1c73ad66610bffc80b691136ffc1e9a3b1a58'/>
<id>urn:sha1:9cc1c73ad66610bffc80b691136ffc1e9a3b1a58</id>
<content type='text'>
Can overflow so we might allocate very small table when bucket count is
high on a 32bit platform.

Note: resize is only possible from init_netns.

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>netfilter: nft_meta: set skb-&gt;nf_trace appropriately</title>
<updated>2016-06-23T12:15:33Z</updated>
<author>
<name>Liping Zhang</name>
<email>liping.zhang@spreadtrum.com</email>
</author>
<published>2016-06-08T12:20:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=62131e5d735226074cba53095545d76b491e5003'/>
<id>urn:sha1:62131e5d735226074cba53095545d76b491e5003</id>
<content type='text'>
When user add a nft rule to set nftrace to zero, for example:

  # nft add rule ip filter input nftrace set 0

We should set nf_trace to zero also.

Signed-off-by: Liping Zhang &lt;liping.zhang@spreadtrum.com&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: nf_tables: fix memory leak if expr init fails</title>
<updated>2016-06-23T12:15:24Z</updated>
<author>
<name>Liping Zhang</name>
<email>liping.zhang@spreadtrum.com</email>
</author>
<published>2016-06-20T13:11:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6cafaf4764a32597c2195aa5411b87728e1fde8a'/>
<id>urn:sha1:6cafaf4764a32597c2195aa5411b87728e1fde8a</id>
<content type='text'>
If expr init fails then we need to free it.

So when the user add a nft rule as follows:

  # nft add rule filter input tcp dport 22 flow table ssh \
    { ip saddr limit rate 0/second }

memory leak will happen.

Signed-off-by: Liping Zhang &lt;liping.zhang@spreadtrum.com&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: nf_tables: fix a wrong check to skip the inactive rules</title>
<updated>2016-06-15T10:17:24Z</updated>
<author>
<name>Liping Zhang</name>
<email>liping.zhang@spreadtrum.com</email>
</author>
<published>2016-06-14T12:13:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8fff1722f705ce5023a0d6d77a31a9d013be2a34'/>
<id>urn:sha1:8fff1722f705ce5023a0d6d77a31a9d013be2a34</id>
<content type='text'>
nft_genmask_cur has already done left-shift operator on the gencursor,
so there's no need to do left-shift operator on it again.

Fixes: ea4bd995b0f2 ("netfilter: nf_tables: add transaction helper functions")
Cc: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: Liping Zhang &lt;liping.zhang@spreadtrum.com&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: nf_tables: fix wrong destroy anonymous sets if binding fails</title>
<updated>2016-06-15T10:17:23Z</updated>
<author>
<name>Liping Zhang</name>
<email>liping.zhang@spreadtrum.com</email>
</author>
<published>2016-06-11T04:20:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a02f424863610a0a7abd80c468839e59cfa4d0d8'/>
<id>urn:sha1:a02f424863610a0a7abd80c468839e59cfa4d0d8</id>
<content type='text'>
When we add a nft rule like follows:
  # nft add rule filter test tcp dport vmap {1: jump test}
-ELOOP error will be returned, and the anonymous set will be
destroyed.

But after that, nf_tables_abort will also try to remove the
element and destroy the set, which was already destroyed and
freed.

If we add a nft wrong rule, nft_tables_abort will do the cleanup
work rightly, so nf_tables_set_destroy call here is redundant and
wrong, remove it.

Signed-off-by: Liping Zhang &lt;liping.zhang@spreadtrum.com&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: nf_tables: reject loops from set element jump to chain</title>
<updated>2016-06-15T10:17:23Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2016-06-11T04:20:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8588ac097b49ce8802f11541d9cd6f6667badb34'/>
<id>urn:sha1:8588ac097b49ce8802f11541d9cd6f6667badb34</id>
<content type='text'>
Liping Zhang says:

"Users may add such a wrong nft rules successfully, which will cause an
endless jump loop:

  # nft add rule filter test tcp dport vmap {1: jump test}

This is because before we commit, the element in the current anonymous
set is inactive, so osp-&gt;walk will skip this element and miss the
validate check."

To resolve this problem, this patch passes the generation mask to the
walk function through the iter container structure depending on the code
path:

1) If we're dumping the elements, then we have to check if the element
   is active in the current generation. Thus, we check for the current
   bit in the genmask.

2) If we're checking for loops, then we have to check if the element is
   active in the next generation, as we're in the middle of a
   transaction. Thus, we check for the next bit in the genmask.

Based on original patch from Liping Zhang.

Reported-by: Liping Zhang &lt;liping.zhang@spreadtrum.com&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
Tested-by: Liping Zhang &lt;liping.zhang@spreadtrum.com&gt;
</content>
</entry>
</feed>
