<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/net/netfilter, branch v3.2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/include/net/netfilter?h=v3.2</id>
<link rel='self' href='https://git.amat.us/linux/atom/include/net/netfilter?h=v3.2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-11-21T23:34:47Z</updated>
<entry>
<title>netfilter: nf_conntrack: make event callback registration per-netns</title>
<updated>2011-11-21T23:34:47Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2011-11-21T23:16:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=70e9942f17a6193e9172a804e6569a8806633d6b'/>
<id>urn:sha1:70e9942f17a6193e9172a804e6569a8806633d6b</id>
<content type='text'>
This patch fixes an oops that can be triggered following this recipe:

0) make sure nf_conntrack_netlink and nf_conntrack_ipv4 are loaded.
1) container is started.
2) connect to it via lxc-console.
3) generate some traffic with the container to create some conntrack
   entries in its table.
4) stop the container: you hit one oops because the conntrack table
   cleanup tries to report the destroy event to user-space but the
   per-netns nfnetlink socket has already gone (as the nfnetlink
   socket is per-netns but event callback registration is global).

To fix this situation, we make the ctnl_notifier per-netns so the
callback is registered/unregistered if the container is
created/destroyed.

Alex Bligh and Alexey Dobriyan originally proposed one small patch to
check if the nfnetlink socket is gone in nfnetlink_has_listeners,
but this is a very visited path for events, thus, it may reduce
performance and it looks a bit hackish to check for the nfnetlink
socket only to workaround this situation. As a result, I decided
to follow the bigger path choice, which seems to look nicer to me.

Cc: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Reported-by: Alex Bligh &lt;alex@alex.org.uk&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux</title>
<updated>2011-11-07T03:44:47Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-11-07T03:44:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=32aaeffbd4a7457bf2f7448b33b5946ff2a960eb'/>
<id>urn:sha1:32aaeffbd4a7457bf2f7448b33b5946ff2a960eb</id>
<content type='text'>
* 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
  Revert "tracing: Include module.h in define_trace.h"
  irq: don't put module.h into irq.h for tracking irqgen modules.
  bluetooth: macroize two small inlines to avoid module.h
  ip_vs.h: fix implicit use of module_get/module_put from module.h
  nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
  include: replace linux/module.h with "struct module" wherever possible
  include: convert various register fcns to macros to avoid include chaining
  crypto.h: remove unused crypto_tfm_alg_modname() inline
  uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
  pm_runtime.h: explicitly requires notifier.h
  linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
  miscdevice.h: fix up implicit use of lists and types
  stop_machine.h: fix implicit use of smp.h for smp_processor_id
  of: fix implicit use of errno.h in include/linux/of.h
  of_platform.h: delete needless include &lt;linux/module.h&gt;
  acpi: remove module.h include from platform/aclinux.h
  miscdevice.h: delete unnecessary inclusion of module.h
  device_cgroup.h: delete needless include &lt;linux/module.h&gt;
  net: sch_generic remove redundant use of &lt;linux/module.h&gt;
  net: inet_timewait_sock doesnt need &lt;linux/module.h&gt;
  ...

Fix up trivial conflicts (other header files, and  removal of the ab3550 mfd driver) in
 - drivers/media/dvb/frontends/dibx000_common.c
 - drivers/media/video/{mt9m111.c,ov6650.c}
 - drivers/mfd/ab3550-core.c
 - include/linux/dmaengine.h
</content>
</entry>
<entry>
<title>netfilter: export NAT definitions through linux/netfilter_ipv4/nf_nat.h</title>
<updated>2011-11-01T08:19:52Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2011-10-01T17:51:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8d83f63b19d45ba0898b97824afcc8e0b5c954cb'/>
<id>urn:sha1:8d83f63b19d45ba0898b97824afcc8e0b5c954cb</id>
<content type='text'>
This patch exports several definitions that used to live under
include/net/netfilter/nf_nat.h. These definitions, although not
exported, have been used by iptables and other userspace
applications like miniupnpd since long time. Basically, these
userspace tools included some internal definition of the required
structures and they assume no changes in the binary representation
(which is OK indeed).

To resolve this situation, this patch makes public the required
structure and install them in INSTALL_HDR_PATH.

See: https://bugs.gentoo.org/376873, for more information.

This patch is heavily based on the initial patch sent by:

Anthony G. Basile &lt;blueness@gentoo.org&gt;

Which was entitled:

netfilter: export sanitized nf_nat.h to INSTALL_HDR_PATH

Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>treewide: use __printf not __attribute__((format(printf,...)))</title>
<updated>2011-11-01T00:30:54Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2011-11-01T00:11:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b9075fa968a0a4347aef35e235e2995c0e57dddd'/>
<id>urn:sha1:b9075fa968a0a4347aef35e235e2995c0e57dddd</id>
<content type='text'>
Standardize the style for compiler based printf format verification.
Standardized the location of __printf too.

Done via script and a little typing.

$ grep -rPl --include=*.[ch] -w "__attribute__" * | \
  grep -vP "^(tools|scripts|include/linux/compiler-gcc.h)" | \
  xargs perl -n -i -e 'local $/; while (&lt;&gt;) { s/\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf\s*,\s*(.+)\s*,\s*(.+)\s*\)\s*\)\s*\)/__printf($1, $2)/g ; print; }'

[akpm@linux-foundation.org: revert arch bits]
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: "Kirill A. Shutemov" &lt;kirill@shutemov.name&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>nf_conntrack.h: fix up fallout from implicit moduleparam.h presence</title>
<updated>2011-10-31T23:32:33Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2011-08-29T17:21:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=34641c6d003a0a94ccabf78211f42da36799f1a2'/>
<id>urn:sha1:34641c6d003a0a94ccabf78211f42da36799f1a2</id>
<content type='text'>
The implicit presence of module.h everywhere meant that this header
also was getting moduleparam.h which defines struct kernel_param.

Since it only needs to know that kernel_param is a struct, call that
out instead of adding an include of moduleparam.h -- to get rid of this:

include/net/netfilter/nf_conntrack.h:316: warning: 'struct kernel_param' declared inside parameter list
include/net/netfilter/nf_conntrack.h:316: warning: its scope is only this definition or declaration, which is probably not what you want

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&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.amat.us/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>netfilter: nf_nat: avoid double seq_adjust for loopback</title>
<updated>2011-06-16T15:29:22Z</updated>
<author>
<name>Julian Anastasov</name>
<email>ja@ssi.bg</email>
</author>
<published>2011-06-16T15:29:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=42c1edd345c8412d96e7a362ee06feb7be73bb6c'/>
<id>urn:sha1:42c1edd345c8412d96e7a362ee06feb7be73bb6c</id>
<content type='text'>
	Avoid double seq adjustment for loopback traffic
because it causes silent repetition of TCP data. One
example is passive FTP with DNAT rule and difference in the
length of IP addresses.

	This patch adds check if packet is sent and
received via loopback device. As the same conntrack is
used both for outgoing and incoming direction, we restrict
seq adjustment to happen only in POSTROUTING.

Signed-off-by: Julian Anastasov &lt;ja@ssi.bg&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</content>
</entry>
<entry>
<title>net: Remove __KERNEL__ cpp checks from include/net</title>
<updated>2011-04-24T17:54:56Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2011-04-24T17:54:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2a9e9507011440a57d6356ded630ba0c0f5d4b77'/>
<id>urn:sha1:2a9e9507011440a57d6356ded630ba0c0f5d4b77</id>
<content type='text'>
These header files are never installed to user consumption, so any
__KERNEL__ cpp checks are superfluous.

Projects should also not copy these files into their userland utility
sources and try to use them there.  If they insist on doing so, the
onus is on them to sanitize the headers as needed.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6</title>
<updated>2011-02-20T03:17:35Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2011-02-20T03:17:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=da935c66bacb3ed9ada984b053297f87c2dff63a'/>
<id>urn:sha1:da935c66bacb3ed9ada984b053297f87c2dff63a</id>
<content type='text'>
Conflicts:
	Documentation/feature-removal-schedule.txt
	drivers/net/e1000e/netdev.c
	net/xfrm/xfrm_policy.c
</content>
</entry>
<entry>
<title>netfilter: tproxy: do not assign timewait sockets to skb-&gt;sk</title>
<updated>2011-02-17T10:32:38Z</updated>
<author>
<name>Florian Westphal</name>
<email>fwestphal@astaro.com</email>
</author>
<published>2011-02-17T10:32:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d503b30bd648b3cb4e5f50b65d27e389960cc6d9'/>
<id>urn:sha1:d503b30bd648b3cb4e5f50b65d27e389960cc6d9</id>
<content type='text'>
Assigning a socket in timewait state to skb-&gt;sk can trigger
kernel oops, e.g. in nfnetlink_log, which does:

if (skb-&gt;sk) {
        read_lock_bh(&amp;skb-&gt;sk-&gt;sk_callback_lock);
        if (skb-&gt;sk-&gt;sk_socket &amp;&amp; skb-&gt;sk-&gt;sk_socket-&gt;file) ...

in the timewait case, accessing sk-&gt;sk_callback_lock and sk-&gt;sk_socket
is invalid.

Either all of these spots will need to add a test for sk-&gt;sk_state != TCP_TIME_WAIT,
or xt_TPROXY must not assign a timewait socket to skb-&gt;sk.

This does the latter.

If a TW socket is found, assign the tproxy nfmark, but skip the skb-&gt;sk assignment,
thus mimicking behaviour of a '-m socket .. -j MARK/ACCEPT' re-routing rule.

The 'SYN to TW socket' case is left unchanged -- we try to redirect to the
listener socket.

Cc: Balazs Scheidler &lt;bazsi@balabit.hu&gt;
Cc: KOVACS Krisztian &lt;hidden@balabit.hu&gt;
Signed-off-by: Florian Westphal &lt;fwestphal@astaro.com&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</content>
</entry>
</feed>
