<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/net/bridge/br_forward.c, branch v2.6.30.6</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>bridge: Fix LRO crash with tun</title>
<updated>2009-02-09T23:07:18+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2009-02-09T23:07:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4906f9985e310fc01f956256b0d58ac28b0dcb19'/>
<id>4906f9985e310fc01f956256b0d58ac28b0dcb19</id>
<content type='text'>
&gt; Kernel BUG at drivers/net/tun.c:444
&gt; invalid opcode: 0000 [1] SMP
&gt; last sysfs file: /class/net/lo/ifindex
&gt; CPU 0
&gt; Modules linked in: tun ipt_MASQUERADE iptable_nat ip_nat xt_state ip_conntrack
&gt; nfnetlink ipt_REJECT xt_tcpudp iptable_filter d
&gt; Pid: 6912, comm: qemu-kvm Tainted: G      2.6.18-128.el5 #1
&gt; RIP: 0010:[&lt;ffffffff886f57b0&gt;]  [&lt;ffffffff886f57b0&gt;]
&gt; :tun:tun_chr_readv+0x2b1/0x3a6
&gt; RSP: 0018:ffff8102202c5e48  EFLAGS: 00010246
&gt; RAX: 0000000000000000 RBX: ffff8102202c5e98 RCX: 0000000004010000
&gt; RDX: ffff810227063680 RSI: ffff8102202c5e9e RDI: ffff8102202c5e92
&gt; RBP: 0000000000010ff6 R08: 0000000000000000 R09: 0000000000000001
&gt; R10: ffff8102202c5e94 R11: 0000000000000202 R12: ffff8102275357c0
&gt; R13: ffff81022755e500 R14: 0000000000000000 R15: ffff8102202c5ef8
&gt; FS:  00002ae4398db980(0000) GS:ffffffff803ac000(0000) knlGS:0000000000000000
&gt; CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
&gt; CR2: 00002ae4ab514000 CR3: 0000000221344000 CR4: 00000000000026e0
&gt; Process qemu-kvm (pid: 6912, threadinfo ffff8102202c4000, task
&gt; ffff81022e58d820)
&gt; Stack:  00000000498735cb ffff810229d1a3c0 0000000000000000 ffff81022e58d820
&gt;  ffffffff8008a461 ffff81022755e528 ffff81022755e528 ffffffff8009f925
&gt;  000005ea05ea0000 ffff8102209d0000 00001051143e1600 ffffffff8003c00e
&gt; Call Trace:
&gt;  [&lt;ffffffff8008a461&gt;] default_wake_function+0x0/0xe
&gt;  [&lt;ffffffff8009f925&gt;] enqueue_hrtimer+0x55/0x70
&gt;  [&lt;ffffffff8003c00e&gt;] hrtimer_start+0xbc/0xce
&gt;  [&lt;ffffffff886f58bf&gt;] :tun:tun_chr_read+0x1a/0x1f
&gt;  [&lt;ffffffff8000b3f3&gt;] vfs_read+0xcb/0x171
&gt;  [&lt;ffffffff800117d4&gt;] sys_read+0x45/0x6e
&gt;  [&lt;ffffffff8005d116&gt;] system_call+0x7e/0x83
&gt;
&gt;
&gt; Code: 0f 0b 68 40 62 6f 88 c2 bc 01 f6 42 0a 08 74 0c 80 4c 24 41
&gt; RIP  [&lt;ffffffff886f57b0&gt;] :tun:tun_chr_readv+0x2b1/0x3a6
&gt;  RSP &lt;ffff8102202c5e48&gt;
&gt;  &lt;0&gt;Kernel panic - not syncing: Fatal exception

This crashed when an LRO packet generated by bnx2x reached a
tun device through the bridge.  We're supposed to drop it at
the bridge.  However, because the check was placed in br_forward
instead of __br_forward, it's only effective if we are sending
the packet through a single port.

This patch fixes it by moving the check into __br_forward.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&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>
&gt; Kernel BUG at drivers/net/tun.c:444
&gt; invalid opcode: 0000 [1] SMP
&gt; last sysfs file: /class/net/lo/ifindex
&gt; CPU 0
&gt; Modules linked in: tun ipt_MASQUERADE iptable_nat ip_nat xt_state ip_conntrack
&gt; nfnetlink ipt_REJECT xt_tcpudp iptable_filter d
&gt; Pid: 6912, comm: qemu-kvm Tainted: G      2.6.18-128.el5 #1
&gt; RIP: 0010:[&lt;ffffffff886f57b0&gt;]  [&lt;ffffffff886f57b0&gt;]
&gt; :tun:tun_chr_readv+0x2b1/0x3a6
&gt; RSP: 0018:ffff8102202c5e48  EFLAGS: 00010246
&gt; RAX: 0000000000000000 RBX: ffff8102202c5e98 RCX: 0000000004010000
&gt; RDX: ffff810227063680 RSI: ffff8102202c5e9e RDI: ffff8102202c5e92
&gt; RBP: 0000000000010ff6 R08: 0000000000000000 R09: 0000000000000001
&gt; R10: ffff8102202c5e94 R11: 0000000000000202 R12: ffff8102275357c0
&gt; R13: ffff81022755e500 R14: 0000000000000000 R15: ffff8102202c5ef8
&gt; FS:  00002ae4398db980(0000) GS:ffffffff803ac000(0000) knlGS:0000000000000000
&gt; CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
&gt; CR2: 00002ae4ab514000 CR3: 0000000221344000 CR4: 00000000000026e0
&gt; Process qemu-kvm (pid: 6912, threadinfo ffff8102202c4000, task
&gt; ffff81022e58d820)
&gt; Stack:  00000000498735cb ffff810229d1a3c0 0000000000000000 ffff81022e58d820
&gt;  ffffffff8008a461 ffff81022755e528 ffff81022755e528 ffffffff8009f925
&gt;  000005ea05ea0000 ffff8102209d0000 00001051143e1600 ffffffff8003c00e
&gt; Call Trace:
&gt;  [&lt;ffffffff8008a461&gt;] default_wake_function+0x0/0xe
&gt;  [&lt;ffffffff8009f925&gt;] enqueue_hrtimer+0x55/0x70
&gt;  [&lt;ffffffff8003c00e&gt;] hrtimer_start+0xbc/0xce
&gt;  [&lt;ffffffff886f58bf&gt;] :tun:tun_chr_read+0x1a/0x1f
&gt;  [&lt;ffffffff8000b3f3&gt;] vfs_read+0xcb/0x171
&gt;  [&lt;ffffffff800117d4&gt;] sys_read+0x45/0x6e
&gt;  [&lt;ffffffff8005d116&gt;] system_call+0x7e/0x83
&gt;
&gt;
&gt; Code: 0f 0b 68 40 62 6f 88 c2 bc 01 f6 42 0a 08 74 0c 80 4c 24 41
&gt; RIP  [&lt;ffffffff886f57b0&gt;] :tun:tun_chr_readv+0x2b1/0x3a6
&gt;  RSP &lt;ffff8102202c5e48&gt;
&gt;  &lt;0&gt;Kernel panic - not syncing: Fatal exception

This crashed when an LRO packet generated by bnx2x reached a
tun device through the bridge.  We're supposed to drop it at
the bridge.  However, because the check was placed in br_forward
instead of __br_forward, it's only effective if we are sending
the packet through a single port.

This patch fixes it by moving the check into __br_forward.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Discard and warn about LRO'd skbs received for forwarding</title>
<updated>2008-06-19T23:22:28+00:00</updated>
<author>
<name>Ben Hutchings</name>
<email>bhutchings@solarflare.com</email>
</author>
<published>2008-06-19T23:22:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4497b0763cb1afae463f5e144c28b5d806e28b60'/>
<id>4497b0763cb1afae463f5e144c28b5d806e28b60</id>
<content type='text'>
Add skb_warn_if_lro() to test whether an skb was received with LRO and
warn if so.

Change br_forward(), ip_forward() and ip6_forward() to call it) and
discard the skb if it returns true.

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.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>
Add skb_warn_if_lro() to test whether an skb was received with LRO and
warn if so.

Change br_forward(), ip_forward() and ip6_forward() to call it) and
discard the skb if it returns true.

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: remove CVS keywords</title>
<updated>2008-06-12T04:00:38+00:00</updated>
<author>
<name>Adrian Bunk</name>
<email>bunk@kernel.org</email>
</author>
<published>2008-06-11T05:46:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0b040829952d84bf2a62526f0e24b624e0699447'/>
<id>0b040829952d84bf2a62526f0e24b624e0699447</id>
<content type='text'>
This patch removes CVS keywords that weren't updated for a long time
from comments.

Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&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 patch removes CVS keywords that weren't updated for a long time
from comments.

Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bridge: Use on-device stats instead of private ones.</title>
<updated>2008-05-21T21:13:47+00:00</updated>
<author>
<name>Pavel Emelyanov</name>
<email>xemul@openvz.org</email>
</author>
<published>2008-05-21T21:13:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a339f1c881fdb8092ef9b118610307e10e885fc8'/>
<id>a339f1c881fdb8092ef9b118610307e10e885fc8</id>
<content type='text'>
Even though bridges require 6 fields from struct net_device_stats,
the on-device stats are always there, so we may just use them.

The br_dev_get_stats is no longer required after this.

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&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>
Even though bridges require 6 fields from struct net_device_stats,
the on-device stats are always there, so we may just use them.

The br_dev_get_stats is no longer required after this.

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[BRIDGE]: Kill clone argument to br_flood_*</title>
<updated>2007-09-16T23:20:48+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2007-09-16T23:20:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e081e1e3ef4682802ac63b1e5e26158fb9ca9e90'/>
<id>e081e1e3ef4682802ac63b1e5e26158fb9ca9e90</id>
<content type='text'>
The clone argument is only used by one caller and that caller can clone
the packet itself.  This patch moves the clone call into the caller and
kills the clone argument.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&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>
The clone argument is only used by one caller and that caller can clone
the packet itself.  This patch moves the clone call into the caller and
kills the clone argument.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[NET]: Allow forwarding of ip_summed except CHECKSUM_COMPLETE</title>
<updated>2007-04-26T05:28:16+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2007-03-27T06:22:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=35fc92a9deee0da6e35fdc3150bb134e58f2fd63'/>
<id>35fc92a9deee0da6e35fdc3150bb134e58f2fd63</id>
<content type='text'>
Right now Xen has a horrible hack that lets it forward packets with
partial checksums.  One of the reasons that CHECKSUM_PARTIAL and
CHECKSUM_COMPLETE were added is so that we can get rid of this hack
(where it creates two extra bits in the skbuff to essentially mirror
ip_summed without being destroyed by the forwarding code).

I had forgotten that I've already gone through all the deivce drivers
last time around to make sure that they're looking at ip_summed ==
CHECKSUM_PARTIAL rather than ip_summed != 0 on transmit.  In any case,
I've now done that again so it should definitely be safe.

Unfortunately nobody has yet added any code to update CHECKSUM_COMPLETE
values on forward so we I'm setting that to CHECKSUM_NONE.  This should
be safe to remove for bridging but I'd like to check that code path
first.

So here is the patch that lets us get rid of the hack by preserving
ip_summed (mostly) on forwarded packets.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&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>
Right now Xen has a horrible hack that lets it forward packets with
partial checksums.  One of the reasons that CHECKSUM_PARTIAL and
CHECKSUM_COMPLETE were added is so that we can get rid of this hack
(where it creates two extra bits in the skbuff to essentially mirror
ip_summed without being destroyed by the forwarding code).

I had forgotten that I've already gone through all the deivce drivers
last time around to make sure that they're looking at ip_summed ==
CHECKSUM_PARTIAL rather than ip_summed != 0 on transmit.  In any case,
I've now done that again so it should definitely be safe.

Unfortunately nobody has yet added any code to update CHECKSUM_COMPLETE
values on forward so we I'm setting that to CHECKSUM_NONE.  This should
be safe to remove for bridging but I'd like to check that code path
first.

So here is the patch that lets us get rid of the hack by preserving
ip_summed (mostly) on forwarded packets.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[NET] BRIDGE: Fix whitespace errors.</title>
<updated>2007-02-11T07:19:23+00:00</updated>
<author>
<name>YOSHIFUJI Hideaki</name>
<email>yoshfuji@linux-ipv6.org</email>
</author>
<published>2007-02-09T14:24:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9d6f229fc45b6ac268020c0c8eff29e94bb34381'/>
<id>9d6f229fc45b6ac268020c0c8eff29e94bb34381</id>
<content type='text'>
Signed-off-by: YOSHIFUJI Hideaki &lt;yoshfuji@linux-ipv6.org&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>
Signed-off-by: YOSHIFUJI Hideaki &lt;yoshfuji@linux-ipv6.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[NETFILTER] bridge: code rearrangement for clarity</title>
<updated>2006-09-22T22:18:30+00:00</updated>
<author>
<name>Stephen Hemminger</name>
<email>shemminger@osdl.org</email>
</author>
<published>2006-08-30T00:48:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=07317621d004e8e6967f2dac8562825267e56135'/>
<id>07317621d004e8e6967f2dac8562825267e56135</id>
<content type='text'>
Cleanup and rearrangement for better style and clarity:
	Split the function nf_bridge_maybe_copy_header into two pieces
	Move copy portion out of line.
	Use Ethernet header size macros.
	Use header file to handle CONFIG_NETFILTER_BRIDGE differences

Signed-off-by: Stephen Hemminger &lt;shemminger@osdl.org&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>
Cleanup and rearrangement for better style and clarity:
	Split the function nf_bridge_maybe_copy_header into two pieces
	Move copy portion out of line.
	Use Ethernet header size macros.
	Use header file to handle CONFIG_NETFILTER_BRIDGE differences

Signed-off-by: Stephen Hemminger &lt;shemminger@osdl.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[BRIDGE] netfilter: memory corruption fix</title>
<updated>2006-08-27T03:28:30+00:00</updated>
<author>
<name>Stephen Hemminger</name>
<email>shemminger@osdl.org</email>
</author>
<published>2006-08-27T03:28:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3a13813e6effcfad5910d47b15b724621b50b878'/>
<id>3a13813e6effcfad5910d47b15b724621b50b878</id>
<content type='text'>
The bridge-netfilter code will overwrite memory if there is not
headroom in the skb to save the header.  This first showed up when
using Xen with sky2 driver that doesn't allocate the extra space.

Signed-off-by: Stephen Hemminger &lt;shemminger@osdl.org&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>
The bridge-netfilter code will overwrite memory if there is not
headroom in the skb to save the header.  This first showed up when
using Xen with sky2 driver that doesn't allocate the extra space.

Signed-off-by: Stephen Hemminger &lt;shemminger@osdl.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[NET] gso: Add skb_is_gso</title>
<updated>2006-07-08T20:34:32+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2006-07-08T20:34:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=89114afd435a486deb8583e89f490fc274444d18'/>
<id>89114afd435a486deb8583e89f490fc274444d18</id>
<content type='text'>
This patch adds the wrapper function skb_is_gso which can be used instead
of directly testing skb_shinfo(skb)-&gt;gso_size.  This makes things a little
nicer and allows us to change the primary key for indicating whether an skb
is GSO (if we ever want to do that).

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&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 patch adds the wrapper function skb_is_gso which can be used instead
of directly testing skb_shinfo(skb)-&gt;gso_size.  This makes things a little
nicer and allows us to change the primary key for indicating whether an skb
is GSO (if we ever want to do that).

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
