<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/include/linux/netfilter, branch linux-2.6.33.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>netfilter: ctnetlink: fix reliable event delivery if message building fails</title>
<updated>2010-04-01T23:02:09+00:00</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2010-03-30T04:28:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5dda8d1fc44f3ab37c0e5c8e980254b6703ef8b2'/>
<id>5dda8d1fc44f3ab37c0e5c8e980254b6703ef8b2</id>
<content type='text'>
[ Upstream commit 37b7ef7203240b3aba577bb1ff6765fe15225976 ]

This patch fixes a bug that allows to lose events when reliable
event delivery mode is used, ie. if NETLINK_BROADCAST_SEND_ERROR
and NETLINK_RECV_NO_ENOBUFS socket options are set.

Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 37b7ef7203240b3aba577bb1ff6765fe15225976 ]

This patch fixes a bug that allows to lose events when reliable
event delivery mode is used, ie. if NETLINK_BROADCAST_SEND_ERROR
and NETLINK_RECV_NO_ENOBUFS socket options are set.

Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6</title>
<updated>2009-12-03T21:23:12+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2009-12-03T21:23:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=424eff975192553a9ea8bfd51bf65039ffb356ef'/>
<id>424eff975192553a9ea8bfd51bf65039ffb356ef</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>netfilter: nf_ct_tcp: improve out-of-sync situation in TCP tracking</title>
<updated>2009-11-23T09:37:34+00:00</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2009-11-23T09:34:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c4832c7bbc3f7a4813347e871d7238651bf437d3'/>
<id>c4832c7bbc3f7a4813347e871d7238651bf437d3</id>
<content type='text'>
Without this patch, if we receive a SYN packet from the client while
the firewall is out-of-sync, we let it go through. Then, if we see
the SYN/ACK reply coming from the server, we destroy the conntrack
entry and drop the packet to trigger a new retransmission. Then,
the retransmision from the client is used to start a new clean
session.

This patch improves the current handling. Basically, if we see an
unexpected SYN packet, we annotate the TCP options. Then, if we
see the reply SYN/ACK, this means that the firewall was indeed
out-of-sync. Therefore, we set a clean new session from the existing
entry based on the annotated values.

This patch adds two new 8-bits fields that fit in a 16-bits gap of
the ip_ct_tcp structure.

This patch is particularly useful for conntrackd since the
asynchronous nature of the state-synchronization allows to have
backup nodes that are not perfect copies of the master. This helps
to improve the recovery under some worst-case scenarios.

I have tested this by creating lots of conntrack entries in wrong
state:

for ((i=1024;i&lt;65535;i++)); do conntrack -I -p tcp -s 192.168.2.101 -d 192.168.2.2 --sport $i --dport 80 -t 800 --state ESTABLISHED -u ASSURED,SEEN_REPLY; done

Then, I make some TCP connections:

$ echo GET / | nc 192.168.2.2 80

The events show the result:

 [UPDATE] tcp      6 60 SYN_RECV src=192.168.2.101 dst=192.168.2.2 sport=33220 dport=80 src=192.168.2.2 dst=192.168.2.101 sport=80 dport=33220 [ASSURED]
 [UPDATE] tcp      6 432000 ESTABLISHED src=192.168.2.101 dst=192.168.2.2 sport=33220 dport=80 src=192.168.2.2 dst=192.168.2.101 sport=80 dport=33220 [ASSURED]
 [UPDATE] tcp      6 120 FIN_WAIT src=192.168.2.101 dst=192.168.2.2 sport=33220 dport=80 src=192.168.2.2 dst=192.168.2.101 sport=80 dport=33220 [ASSURED]
 [UPDATE] tcp      6 30 LAST_ACK src=192.168.2.101 dst=192.168.2.2 sport=33220 dport=80 src=192.168.2.2 dst=192.168.2.101 sport=80 dport=33220 [ASSURED]
 [UPDATE] tcp      6 120 TIME_WAIT src=192.168.2.101 dst=192.168.2.2 sport=33220 dport=80 src=192.168.2.2 dst=192.168.2.101 sport=80 dport=33220 [ASSURED]

and tcpdump shows no retransmissions:

20:47:57.271951 IP 192.168.2.101.33221 &gt; 192.168.2.2.www: S 435402517:435402517(0) win 5840 &lt;mss 1460,sackOK,timestamp 4294961827 0,nop,wscale 6&gt;
20:47:57.273538 IP 192.168.2.2.www &gt; 192.168.2.101.33221: S 3509927945:3509927945(0) ack 435402518 win 5792 &lt;mss 1460,sackOK,timestamp 235681024 4294961827,nop,wscale 4&gt;
20:47:57.273608 IP 192.168.2.101.33221 &gt; 192.168.2.2.www: . ack 3509927946 win 92 &lt;nop,nop,timestamp 4294961827 235681024&gt;
20:47:57.273693 IP 192.168.2.101.33221 &gt; 192.168.2.2.www: P 435402518:435402524(6) ack 3509927946 win 92 &lt;nop,nop,timestamp 4294961827 235681024&gt;
20:47:57.275492 IP 192.168.2.2.www &gt; 192.168.2.101.33221: . ack 435402524 win 362 &lt;nop,nop,timestamp 235681024 4294961827&gt;
20:47:57.276492 IP 192.168.2.2.www &gt; 192.168.2.101.33221: P 3509927946:3509928082(136) ack 435402524 win 362 &lt;nop,nop,timestamp 235681025 4294961827&gt;
20:47:57.276515 IP 192.168.2.101.33221 &gt; 192.168.2.2.www: . ack 3509928082 win 108 &lt;nop,nop,timestamp 4294961828 235681025&gt;
20:47:57.276521 IP 192.168.2.2.www &gt; 192.168.2.101.33221: F 3509928082:3509928082(0) ack 435402524 win 362 &lt;nop,nop,timestamp 235681025 4294961827&gt;
20:47:57.277369 IP 192.168.2.101.33221 &gt; 192.168.2.2.www: F 435402524:435402524(0) ack 3509928083 win 108 &lt;nop,nop,timestamp 4294961828 235681025&gt;
20:47:57.279491 IP 192.168.2.2.www &gt; 192.168.2.101.33221: . ack 435402525 win 362 &lt;nop,nop,timestamp 235681025 4294961828&gt;

I also added a rule to log invalid packets, with no occurrences  :-) .

Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
Acked-by: Jozsef Kadlecsik &lt;kadlec@blackhole.kfki.hu&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Without this patch, if we receive a SYN packet from the client while
the firewall is out-of-sync, we let it go through. Then, if we see
the SYN/ACK reply coming from the server, we destroy the conntrack
entry and drop the packet to trigger a new retransmission. Then,
the retransmision from the client is used to start a new clean
session.

This patch improves the current handling. Basically, if we see an
unexpected SYN packet, we annotate the TCP options. Then, if we
see the reply SYN/ACK, this means that the firewall was indeed
out-of-sync. Therefore, we set a clean new session from the existing
entry based on the annotated values.

This patch adds two new 8-bits fields that fit in a 16-bits gap of
the ip_ct_tcp structure.

This patch is particularly useful for conntrackd since the
asynchronous nature of the state-synchronization allows to have
backup nodes that are not perfect copies of the master. This helps
to improve the recovery under some worst-case scenarios.

I have tested this by creating lots of conntrack entries in wrong
state:

for ((i=1024;i&lt;65535;i++)); do conntrack -I -p tcp -s 192.168.2.101 -d 192.168.2.2 --sport $i --dport 80 -t 800 --state ESTABLISHED -u ASSURED,SEEN_REPLY; done

Then, I make some TCP connections:

$ echo GET / | nc 192.168.2.2 80

The events show the result:

 [UPDATE] tcp      6 60 SYN_RECV src=192.168.2.101 dst=192.168.2.2 sport=33220 dport=80 src=192.168.2.2 dst=192.168.2.101 sport=80 dport=33220 [ASSURED]
 [UPDATE] tcp      6 432000 ESTABLISHED src=192.168.2.101 dst=192.168.2.2 sport=33220 dport=80 src=192.168.2.2 dst=192.168.2.101 sport=80 dport=33220 [ASSURED]
 [UPDATE] tcp      6 120 FIN_WAIT src=192.168.2.101 dst=192.168.2.2 sport=33220 dport=80 src=192.168.2.2 dst=192.168.2.101 sport=80 dport=33220 [ASSURED]
 [UPDATE] tcp      6 30 LAST_ACK src=192.168.2.101 dst=192.168.2.2 sport=33220 dport=80 src=192.168.2.2 dst=192.168.2.101 sport=80 dport=33220 [ASSURED]
 [UPDATE] tcp      6 120 TIME_WAIT src=192.168.2.101 dst=192.168.2.2 sport=33220 dport=80 src=192.168.2.2 dst=192.168.2.101 sport=80 dport=33220 [ASSURED]

and tcpdump shows no retransmissions:

20:47:57.271951 IP 192.168.2.101.33221 &gt; 192.168.2.2.www: S 435402517:435402517(0) win 5840 &lt;mss 1460,sackOK,timestamp 4294961827 0,nop,wscale 6&gt;
20:47:57.273538 IP 192.168.2.2.www &gt; 192.168.2.101.33221: S 3509927945:3509927945(0) ack 435402518 win 5792 &lt;mss 1460,sackOK,timestamp 235681024 4294961827,nop,wscale 4&gt;
20:47:57.273608 IP 192.168.2.101.33221 &gt; 192.168.2.2.www: . ack 3509927946 win 92 &lt;nop,nop,timestamp 4294961827 235681024&gt;
20:47:57.273693 IP 192.168.2.101.33221 &gt; 192.168.2.2.www: P 435402518:435402524(6) ack 3509927946 win 92 &lt;nop,nop,timestamp 4294961827 235681024&gt;
20:47:57.275492 IP 192.168.2.2.www &gt; 192.168.2.101.33221: . ack 435402524 win 362 &lt;nop,nop,timestamp 235681024 4294961827&gt;
20:47:57.276492 IP 192.168.2.2.www &gt; 192.168.2.101.33221: P 3509927946:3509928082(136) ack 435402524 win 362 &lt;nop,nop,timestamp 235681025 4294961827&gt;
20:47:57.276515 IP 192.168.2.101.33221 &gt; 192.168.2.2.www: . ack 3509928082 win 108 &lt;nop,nop,timestamp 4294961828 235681025&gt;
20:47:57.276521 IP 192.168.2.2.www &gt; 192.168.2.101.33221: F 3509928082:3509928082(0) ack 435402524 win 362 &lt;nop,nop,timestamp 235681025 4294961827&gt;
20:47:57.277369 IP 192.168.2.101.33221 &gt; 192.168.2.2.www: F 435402524:435402524(0) ack 3509928083 win 108 &lt;nop,nop,timestamp 4294961828 235681025&gt;
20:47:57.279491 IP 192.168.2.2.www &gt; 192.168.2.101.33221: . ack 435402525 win 362 &lt;nop,nop,timestamp 235681025 4294961828&gt;

I also added a rule to log invalid packets, with no occurrences  :-) .

Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
Acked-by: Jozsef Kadlecsik &lt;kadlec@blackhole.kfki.hu&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: cleanup include/linux</title>
<updated>2009-11-04T17:50:58+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2009-11-04T17:50:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d94d9fee9fa4e66a0b91640a694b8b10177075b3'/>
<id>d94d9fee9fa4e66a0b91640a694b8b10177075b3</id>
<content type='text'>
This cleanup patch puts struct/union/enum opening braces,
in first line to ease grep games.

struct something
{

becomes :

struct something {

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This cleanup patch puts struct/union/enum opening braces,
in first line to ease grep games.

struct something
{

becomes :

struct something {

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netfilter: nfnetlink: constify message attributes and headers</title>
<updated>2009-08-25T14:07:58+00:00</updated>
<author>
<name>Patrick McHardy</name>
<email>kaber@trash.net</email>
</author>
<published>2009-08-25T14:07:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3993832464dd4e14a4c926583a11f0fa92c1f0f0'/>
<id>3993832464dd4e14a4c926583a11f0fa92c1f0f0</id>
<content type='text'>
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netfilter: xtables: mark initial tables constant</title>
<updated>2009-08-24T12:56:30+00:00</updated>
<author>
<name>Jan Engelhardt</name>
<email>jengelh@medozas.de</email>
</author>
<published>2009-08-24T12:56:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=35aad0ffdf548617940ca1e78be1f2e0bafc4496'/>
<id>35aad0ffdf548617940ca1e78be1f2e0bafc4496</id>
<content type='text'>
The inputted table is never modified, so should be considered const.

Signed-off-by: Jan Engelhardt &lt;jengelh@medozas.de&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The inputted table is never modified, so should be considered const.

Signed-off-by: Jan Engelhardt &lt;jengelh@medozas.de&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netfilter: xtables: realign struct xt_target_param</title>
<updated>2009-08-10T11:35:24+00:00</updated>
<author>
<name>Jan Engelhardt</name>
<email>jengelh@medozas.de</email>
</author>
<published>2009-07-05T13:55:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=98d89b4198cf7273968e9217a62ec7ccfd760171'/>
<id>98d89b4198cf7273968e9217a62ec7ccfd760171</id>
<content type='text'>
This commit gets rid of a padding hole as reported by pahole(1).
Saves 8 bytes on x86_64.

Signed-off-by: Jan Engelhardt &lt;jengelh@medozas.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit gets rid of a padding hole as reported by pahole(1).
Saves 8 bytes on x86_64.

Signed-off-by: Jan Engelhardt &lt;jengelh@medozas.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netfilter: xtables: remove xt_mark v0</title>
<updated>2009-08-10T11:09:45+00:00</updated>
<author>
<name>Jan Engelhardt</name>
<email>jengelh@medozas.de</email>
</author>
<published>2009-06-12T17:02:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4725c7287ef2c4340cb433f59e40d143c1f43c22'/>
<id>4725c7287ef2c4340cb433f59e40d143c1f43c22</id>
<content type='text'>
Superseded by xt_mark v1 (v2.6.24-2922-g17b0d7e).

Signed-off-by: Jan Engelhardt &lt;jengelh@medozas.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Superseded by xt_mark v1 (v2.6.24-2922-g17b0d7e).

Signed-off-by: Jan Engelhardt &lt;jengelh@medozas.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netfilter: xtables: remove xt_conntrack v0</title>
<updated>2009-08-10T11:09:44+00:00</updated>
<author>
<name>Jan Engelhardt</name>
<email>jengelh@medozas.de</email>
</author>
<published>2009-06-12T16:56:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9e05ec4b1804a1ba51f61fe169aef9b86edcd3f7'/>
<id>9e05ec4b1804a1ba51f61fe169aef9b86edcd3f7</id>
<content type='text'>
Superseded by xt_conntrack v1 (v2.6.24-2921-g64eb12f).

Signed-off-by: Jan Engelhardt &lt;jengelh@medozas.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Superseded by xt_conntrack v1 (v2.6.24-2921-g64eb12f).

Signed-off-by: Jan Engelhardt &lt;jengelh@medozas.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netfilter: xtables: remove xt_connmark v0</title>
<updated>2009-08-10T10:25:12+00:00</updated>
<author>
<name>Jan Engelhardt</name>
<email>jengelh@medozas.de</email>
</author>
<published>2009-06-12T16:50:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=84899a2b9adaf6c2e20d198d7c24562ce6b391d8'/>
<id>84899a2b9adaf6c2e20d198d7c24562ce6b391d8</id>
<content type='text'>
Superseded by xt_connmark v1 (v2.6.24-2919-g96e3227).

Signed-off-by: Jan Engelhardt &lt;jengelh@medozas.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Superseded by xt_connmark v1 (v2.6.24-2919-g96e3227).

Signed-off-by: Jan Engelhardt &lt;jengelh@medozas.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
