<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/netfilter/nfnetlink_queue.c, branch v3.5</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=v3.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2012-05-15T17:45:03Z</updated>
<entry>
<title>net: Convert net_ratelimit uses to net_&lt;level&gt;_ratelimited</title>
<updated>2012-05-15T17:45:03Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2012-05-13T21:56:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e87cc4728f0e2fb663e592a1141742b1d6c63256'/>
<id>urn:sha1:e87cc4728f0e2fb663e592a1141742b1d6c63256</id>
<content type='text'>
Standardize the net core ratelimited logging functions.

Coalesce formats, align arguments.
Change a printk then vprintk sequence to use printf extension %pV.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>nfnetlink_queue: Stop using NLA_PUT*().</title>
<updated>2012-04-01T22:43:44Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-03-30T03:27:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a447189e073bf603e335f20f924b71d385d6b2ef'/>
<id>urn:sha1:a447189e073bf603e335f20f924b71d385d6b2ef</id>
<content type='text'>
These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netfilter: nf_queue: reject NF_STOLEN verdicts from userspace</title>
<updated>2011-08-30T13:01:20Z</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2011-08-30T13:01:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c6675233f9015d3c0460c8aab53ed9b99d915c64'/>
<id>urn:sha1:c6675233f9015d3c0460c8aab53ed9b99d915c64</id>
<content type='text'>
A userspace listener may send (bogus) NF_STOLEN verdict, which causes skb leak.

This problem was previously fixed via
64507fdbc29c3a622180378210ecea8659b14e40 (netfilter:
nf_queue: fix NF_STOLEN skb leak) but this had to be reverted because
NF_STOLEN can also be returned by a netfilter hook when iterating the
rules in nf_reinject.

Reject userspace NF_STOLEN verdict, as suggested by Michal Miroslaw.

This is complementary to commit fad54440438a7c231a6ae347738423cbabc936d9
(netfilter: avoid double free in nf_reinject).

Cc: Julian Anastasov &lt;ja@ssi.bg&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</content>
</entry>
<entry>
<title>atomic: use &lt;linux/atomic.h&gt;</title>
<updated>2011-07-26T23:49:47Z</updated>
<author>
<name>Arun Sharma</name>
<email>asharma@fb.com</email>
</author>
<published>2011-07-26T23:09:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=60063497a95e716c9a689af3be2687d261f115b4'/>
<id>urn:sha1:60063497a95e716c9a689af3be2687d261f115b4</id>
<content type='text'>
This allows us to move duplicated code in &lt;asm/atomic.h&gt;
(atomic_inc_not_zero() for now) to &lt;linux/atomic.h&gt;

Signed-off-by: Arun Sharma &lt;asharma@fb.com&gt;
Reviewed-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Acked-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6</title>
<updated>2011-07-21T19:39:35Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2011-07-21T19:39:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f5caadbb3d8fc0b71533e880c684b2230bdb76ac'/>
<id>urn:sha1:f5caadbb3d8fc0b71533e880c684b2230bdb76ac</id>
<content type='text'>
</content>
</entry>
<entry>
<title>netfilter: nfnetlink_queue: batch verdict support</title>
<updated>2011-07-19T09:46:33Z</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2011-07-19T09:46:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=97d32cf9440d2111a12471740446d4d63231b79a'/>
<id>urn:sha1:97d32cf9440d2111a12471740446d4d63231b79a</id>
<content type='text'>
Introduces a new nfnetlink type that applies a given
verdict to all queued packets with an id &lt;= the id in the verdict
message.

If a mark is provided it is applied to all matched packets.

This reduces the number of verdicts that have to be sent.
Applications that make use of this feature need to maintain
a timeout to send a batchverdict periodically to avoid starvation.

Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</content>
</entry>
<entry>
<title>netfilter: nfnetlink_queue: assert monotonic packet ids</title>
<updated>2011-07-19T09:44:17Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2011-07-19T09:44:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5863702a3421b0d2a63a473cf96afeb9fe09070d'/>
<id>urn:sha1:5863702a3421b0d2a63a473cf96afeb9fe09070d</id>
<content type='text'>
Packet identifier is currently setup in nfqnl_build_packet_message(),
using one atomic_inc_return().

Problem is that since several cpus might concurrently call
nfqnl_enqueue_packet() for the same queue, we can deliver packets to
consumer in non monotonic way (packet N+1 being delivered after packet
N)

This patch moves the packet id setup from nfqnl_build_packet_message()
to nfqnl_enqueue_packet() to guarantee correct delivery order.

This also removes one atomic operation.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: Florian Westphal &lt;fw@strlen.de&gt;
CC: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
CC: Eric Leblond &lt;eric@regit.org&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</content>
</entry>
<entry>
<title>netfilter: nfnetlink_queue: provide rcu enabled callbacks</title>
<updated>2011-07-18T14:08:27Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2011-07-18T14:08:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=84a797dd0b9f7130357b70577fcbda8e638c71a7'/>
<id>urn:sha1:84a797dd0b9f7130357b70577fcbda8e638c71a7</id>
<content type='text'>
nenetlink_queue operations on SMP are not efficent if several queues are
used, because of nfnl_mutex contention when applications give packet
verdict.

Use new call_rcu field in struct nfnl_callback to advertize a callback
that is called under rcu_read_lock instead of nfnl_mutex.

On my 2x4x2 machine, I was able to reach 2.000.000 pps going through
user land returning NF_ACCEPT verdicts without losses, instead of less
than 500.000 pps before patch.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: Florian Westphal &lt;fw@strlen.de&gt;
CC: Eric Leblond &lt;eric@regit.org&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</content>
</entry>
<entry>
<title>netfilter: fix looped (broad|multi)cast's MAC handling</title>
<updated>2011-06-16T15:27:04Z</updated>
<author>
<name>Nicolas Cavallari</name>
<email>cavallar@lri.fr</email>
</author>
<published>2011-06-16T15:27:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2c38de4c1f8da799bdca0e4bb40ca13f2174d3e8'/>
<id>urn:sha1:2c38de4c1f8da799bdca0e4bb40ca13f2174d3e8</id>
<content type='text'>
By default, when broadcast or multicast packet are sent from a local
application, they are sent to the interface then looped by the kernel
to other local applications, going throught netfilter hooks in the
process.

These looped packet have their MAC header removed from the skb by the
kernel looping code. This confuse various netfilter's netlink queue,
netlink log and the legacy ip_queue, because they try to extract a
hardware address from these packets, but extracts a part of the IP
header instead.

This patch prevent NFQUEUE, NFLOG and ip_QUEUE to include a MAC header
if there is none in the packet.

Signed-off-by: Nicolas Cavallari &lt;cavallar@lri.fr&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</content>
</entry>
<entry>
<title>netfilter: nfnetlink_queue: return error number to caller</title>
<updated>2011-01-18T14:27:28Z</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2011-01-18T14:27:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f15850861860636c905b33a9a5be3dcbc2b0d56a'/>
<id>urn:sha1:f15850861860636c905b33a9a5be3dcbc2b0d56a</id>
<content type='text'>
instead of returning -1 on error, return an error number to allow the
caller to handle some errors differently.

ECANCELED is used to indicate that the hook is going away and should be
ignored.

A followup patch will introduce more 'ignore this hook' conditions,
(depending on queue settings) and will move kfree_skb responsibility
to the caller.

Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</content>
</entry>
</feed>
