<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/net/netfilter, branch v2.6.38</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=v2.6.38</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.38'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2011-02-17T10:32:38Z</updated>
<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.shady.money/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>
<entry>
<title>netfilter: ecache: always set events bits, filter them later</title>
<updated>2011-02-01T15:06:30Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2011-02-01T15:06:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3db7e93d3308fb882884b9f024235d6fbf542034'/>
<id>urn:sha1:3db7e93d3308fb882884b9f024235d6fbf542034</id>
<content type='text'>
For the following rule:

iptables -I PREROUTING -t raw -j CT --ctevents assured

The event delivered looks like the following:

 [UPDATE] tcp      6 src=192.168.0.2 dst=192.168.1.2 sport=37041 dport=80 src=192.168.1.2 dst=192.168.1.100 sport=80 dport=37041 [ASSURED]

Note that the TCP protocol state is not included. For that reason
the CT event filtering is not very useful for conntrackd.

To resolve this issue, instead of conditionally setting the CT events
bits based on the ctmask, we always set them and perform the filtering
in the late stage, just before the delivery.

Thus, the event delivered looks like the following:

 [UPDATE] tcp      6 432000 ESTABLISHED src=192.168.0.2 dst=192.168.1.2 sport=37041 dport=80 src=192.168.1.2 dst=192.168.1.100 sport=80 dport=37041 [ASSURED]

Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</content>
</entry>
<entry>
<title>netfilter: fix compilation when conntrack is disabled but tproxy is enabled</title>
<updated>2011-01-12T19:25:08Z</updated>
<author>
<name>KOVACS Krisztian</name>
<email>hidden@balabit.hu</email>
</author>
<published>2011-01-12T19:25:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2fc72c7b84002ffb3c66918e2a7b0ee607d8b5aa'/>
<id>urn:sha1:2fc72c7b84002ffb3c66918e2a7b0ee607d8b5aa</id>
<content type='text'>
The IPv6 tproxy patches split IPv6 defragmentation off of conntrack, but
failed to update the #ifdef stanzas guarding the defragmentation related
fields and code in skbuff and conntrack related code in nf_defrag_ipv6.c.

This patch adds the required #ifdefs so that IPv6 tproxy can truly be used
without connection tracking.

Original report:
http://marc.info/?l=linux-netdev&amp;m=129010118516341&amp;w=2

Reported-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Acked-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: KOVACS Krisztian &lt;hidden@balabit.hu&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: fix the race when initializing nf_ct_expect_hash_rnd</title>
<updated>2011-01-06T19:22:20Z</updated>
<author>
<name>Changli Gao</name>
<email>xiaosuo@gmail.com</email>
</author>
<published>2011-01-05T04:23:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f682cefa5ad204d3bfaa54a58046c66d2d035ac1'/>
<id>urn:sha1:f682cefa5ad204d3bfaa54a58046c66d2d035ac1</id>
<content type='text'>
Since nf_ct_expect_dst_hash() may be called without nf_conntrack_lock
locked, nf_ct_expect_hash_rnd should be initialized in the atomic way.

In this patch, we use nf_conntrack_hash_rnd instead of
nf_ct_expect_hash_rnd.

Signed-off-by: Changli Gao &lt;xiaosuo@gmail.com&gt;
Acked-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6</title>
<updated>2010-10-23T18:47:02Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-10-23T18:47:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5f05647dd81c11a6a165ccc8f0c1370b16f3bcb0'/>
<id>urn:sha1:5f05647dd81c11a6a165ccc8f0c1370b16f3bcb0</id>
<content type='text'>
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1699 commits)
  bnx2/bnx2x: Unsupported Ethtool operations should return -EINVAL.
  vlan: Calling vlan_hwaccel_do_receive() is always valid.
  tproxy: use the interface primary IP address as a default value for --on-ip
  tproxy: added IPv6 support to the socket match
  cxgb3: function namespace cleanup
  tproxy: added IPv6 support to the TPROXY target
  tproxy: added IPv6 socket lookup function to nf_tproxy_core
  be2net: Changes to use only priority codes allowed by f/w
  tproxy: allow non-local binds of IPv6 sockets if IP_TRANSPARENT is enabled
  tproxy: added tproxy sockopt interface in the IPV6 layer
  tproxy: added udp6_lib_lookup function
  tproxy: added const specifiers to udp lookup functions
  tproxy: split off ipv6 defragmentation to a separate module
  l2tp: small cleanup
  nf_nat: restrict ICMP translation for embedded header
  can: mcp251x: fix generation of error frames
  can: mcp251x: fix endless loop in interrupt handler if CANINTF_MERRF is set
  can-raw: add msg_flags to distinguish local traffic
  9p: client code cleanup
  rds: make local functions/variables static
  ...

Fix up conflicts in net/core/dev.c, drivers/net/pcmcia/smc91c92_cs.c and
drivers/net/wireless/ath/ath9k/debug.c as per David
</content>
</entry>
<entry>
<title>tproxy: added IPv6 socket lookup function to nf_tproxy_core</title>
<updated>2010-10-21T14:12:14Z</updated>
<author>
<name>Balazs Scheidler</name>
<email>bazsi@balabit.hu</email>
</author>
<published>2010-10-21T14:12:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3b9afb29917f4ab08decf358ecfd354a72a91ac0'/>
<id>urn:sha1:3b9afb29917f4ab08decf358ecfd354a72a91ac0</id>
<content type='text'>
Signed-off-by: Balazs Scheidler &lt;bazsi@balabit.hu&gt;
Signed-off-by: KOVACS Krisztian &lt;hidden@balabit.hu&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</content>
</entry>
<entry>
<title>tproxy: split off ipv6 defragmentation to a separate module</title>
<updated>2010-10-21T14:03:43Z</updated>
<author>
<name>Balazs Scheidler</name>
<email>bazsi@balabit.hu</email>
</author>
<published>2010-10-21T14:03:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e97c3e278e951501c2f385de70c3ceacdea78c4a'/>
<id>urn:sha1:e97c3e278e951501c2f385de70c3ceacdea78c4a</id>
<content type='text'>
Like with IPv4, TProxy needs IPv6 defragmentation but does not
require connection tracking. Since defragmentation was coupled
with conntrack, I split off the two, creating an nf_defrag_ipv6 module,
similar to the already existing nf_defrag_ipv4.

Signed-off-by: Balazs Scheidler &lt;bazsi@balabit.hu&gt;
Signed-off-by: KOVACS Krisztian &lt;hidden@balabit.hu&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</content>
</entry>
<entry>
<title>tproxy: add lookup type checks for UDP in nf_tproxy_get_sock_v4()</title>
<updated>2010-10-21T10:47:34Z</updated>
<author>
<name>Balazs Scheidler</name>
<email>bazsi@balabit.hu</email>
</author>
<published>2010-10-21T10:47:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6006db84a91838813cdad8a6622a4e39efe9ea47'/>
<id>urn:sha1:6006db84a91838813cdad8a6622a4e39efe9ea47</id>
<content type='text'>
Also, inline this function as the lookup_type is always a literal
and inlining removes branches performed at runtime.

Signed-off-by: Balazs Scheidler &lt;bazsi@balabit.hu&gt;
Signed-off-by: KOVACS Krisztian &lt;hidden@balabit.hu&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</content>
</entry>
<entry>
<title>tproxy: kick out TIME_WAIT sockets in case a new connection comes in with the same tuple</title>
<updated>2010-10-21T10:45:14Z</updated>
<author>
<name>Balazs Scheidler</name>
<email>bazsi@balabit.hu</email>
</author>
<published>2010-10-21T10:45:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=106e4c26b1529e559d1aae777f11b4f8f7bafc26'/>
<id>urn:sha1:106e4c26b1529e559d1aae777f11b4f8f7bafc26</id>
<content type='text'>
Without tproxy redirections an incoming SYN kicks out conflicting
TIME_WAIT sockets, in order to handle clients that reuse ports
within the TIME_WAIT period.

The same mechanism didn't work in case TProxy is involved in finding
the proper socket, as the time_wait processing code looked up the
listening socket assuming that the listener addr/port matches those
of the established connection.

This is not the case with TProxy as the listener addr/port is possibly
changed with the tproxy rule.

Signed-off-by: Balazs Scheidler &lt;bazsi@balabit.hu&gt;
Signed-off-by: KOVACS Krisztian &lt;hidden@balabit.hu&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</content>
</entry>
<entry>
<title>netfilter: ctnetlink: add expectation deletion events</title>
<updated>2010-10-19T08:19:06Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2010-10-19T08:19:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ebbf41df4aabb6d506fa18ea8cb4c2b4388a18b9'/>
<id>urn:sha1:ebbf41df4aabb6d506fa18ea8cb4c2b4388a18b9</id>
<content type='text'>
This patch allows to listen to events that inform about
expectations destroyed.

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