<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/net/bridge, branch v2.6.29</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.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.tavy.me/linux.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>netfilter 05/09: ebtables: fix inversion in match code</title>
<updated>2009-01-13T05:18:35+00:00</updated>
<author>
<name>Jan Engelhardt</name>
<email>jengelh@medozas.de</email>
</author>
<published>2009-01-12T00:06:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d61ba9fd55b52a10b8e0ffd39bbc33587d3bfc8d'/>
<id>d61ba9fd55b52a10b8e0ffd39bbc33587d3bfc8d</id>
<content type='text'>
Commit 8cc784ee (netfilter: change return types of match functions
for ebtables extensions) broke ebtables matches by inverting the
sense of match/nomatch.

Reported-by: Matt Cross &lt;matthltc@us.ibm.com&gt;
Signed-off-by: Jan Engelhardt &lt;jengelh@medozas.de&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&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>
Commit 8cc784ee (netfilter: change return types of match functions
for ebtables extensions) broke ebtables matches by inverting the
sense of match/nomatch.

Reported-by: Matt Cross &lt;matthltc@us.ibm.com&gt;
Signed-off-by: Jan Engelhardt &lt;jengelh@medozas.de&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netfilter 03/09: bridge: Disable PPPOE/VLAN processing by default</title>
<updated>2009-01-13T05:18:34+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2009-01-12T00:06:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=47e0e1ca13d64eeeb687995fbe4e239e743d7544'/>
<id>47e0e1ca13d64eeeb687995fbe4e239e743d7544</id>
<content type='text'>
The PPPOE/VLAN processing code in the bridge netfilter is broken
by design.  The VLAN tag and the PPPOE session ID are an integral
part of the packet flow information, yet they're completely
ignored by the bridge netfilter.  This is potentially a security
hole as it treats all VLANs and PPPOE sessions as the same.

What's more, it's actually broken for PPPOE as the bridge netfilter
tries to trim the packets to the IP length without adjusting the
PPPOE header (and adjusting the PPPOE header isn't much better
since the PPPOE peer may require the padding to be present).

Therefore we should disable this by default.

It does mean that people relying on this feature may lose networking
depending on how their bridge netfilter rules are configured.
However, IMHO the problems this code causes are serious enough to
warrant this.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&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 PPPOE/VLAN processing code in the bridge netfilter is broken
by design.  The VLAN tag and the PPPOE session ID are an integral
part of the packet flow information, yet they're completely
ignored by the bridge netfilter.  This is potentially a security
hole as it treats all VLANs and PPPOE sessions as the same.

What's more, it's actually broken for PPPOE as the bridge netfilter
tries to trim the packets to the IP length without adjusting the
PPPOE header (and adjusting the PPPOE header isn't much better
since the PPPOE peer may require the padding to be present).

Therefore we should disable this by default.

It does mean that people relying on this feature may lose networking
depending on how their bridge netfilter rules are configured.
However, IMHO the problems this code causes are serious enough to
warrant this.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netfilter 02/09: bridge: Fix handling of non-IP packets in FORWARD/POST_ROUTING</title>
<updated>2009-01-13T05:18:33+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2009-01-12T00:06:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a2bd40ad3151d4d346fd167e01fb84b06f7247fc'/>
<id>a2bd40ad3151d4d346fd167e01fb84b06f7247fc</id>
<content type='text'>
Currently the bridge FORWARD/POST_ROUTING chains treats all
non-IPv4 packets as IPv6.  This packet fixes that by returning
NF_ACCEPT on non-IP packets instead, just as is done in PRE_ROUTING.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&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>
Currently the bridge FORWARD/POST_ROUTING chains treats all
non-IPv4 packets as IPv6.  This packet fixes that by returning
NF_ACCEPT on non-IP packets instead, just as is done in PRE_ROUTING.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/bridge/netfilter: move a dereference below a NULL test</title>
<updated>2009-01-11T08:06:33+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>julia@diku.dk</email>
</author>
<published>2009-01-09T10:22:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f3d8b2e467da7a9237a45248ff03b56b6a7c3df7'/>
<id>f3d8b2e467da7a9237a45248ff03b56b6a7c3df7</id>
<content type='text'>
In each case, if the NULL test is necessary, then the dereference should be
moved below the NULL test.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// &lt;smpl&gt;
@@
type T;
expression E;
identifier i,fld;
statement S;
@@

- T i = E-&gt;fld;
+ T i;
  ... when != E
      when != i
  if (E == NULL) S
+ i = E-&gt;fld;
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;julia@diku.dk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.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>
In each case, if the NULL test is necessary, then the dereference should be
moved below the NULL test.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// &lt;smpl&gt;
@@
type T;
expression E;
identifier i,fld;
statement S;
@@

- T i = E-&gt;fld;
+ T i;
  ... when != E
      when != i
  if (E == NULL) S
+ i = E-&gt;fld;
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;julia@diku.dk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&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>2008-11-28T10:19:15+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2008-11-28T10:19:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ed77a89c30fa03dcb234a84ddea710b3fb7b62da'/>
<id>ed77a89c30fa03dcb234a84ddea710b3fb7b62da</id>
<content type='text'>
Conflicts:

	net/netfilter/nf_conntrack_netlink.c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:

	net/netfilter/nf_conntrack_netlink.c
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6</title>
<updated>2008-11-27T07:48:40+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2008-11-27T07:48:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5b9ab2ec04ec1e1e53939768805612ac191d7ba2'/>
<id>5b9ab2ec04ec1e1e53939768805612ac191d7ba2</id>
<content type='text'>
Conflicts:

	drivers/net/hp-plus.c
	drivers/net/wireless/ath5k/base.c
	drivers/net/wireless/ath9k/recv.c
	net/wireless/reg.c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:

	drivers/net/hp-plus.c
	drivers/net/wireless/ath5k/base.c
	drivers/net/wireless/ath9k/recv.c
	net/wireless/reg.c
</pre>
</div>
</content>
</entry>
<entry>
<title>bridge: netfilter: fix update_pmtu crash with GRE</title>
<updated>2008-11-25T00:06:50+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2008-11-25T00:06:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=631339f1e544a4d39a63cfe6708c5bddcd5a2c48'/>
<id>631339f1e544a4d39a63cfe6708c5bddcd5a2c48</id>
<content type='text'>
As GRE tries to call the update_pmtu function on skb-&gt;dst and
bridge supplies an skb-&gt;dst that has a NULL ops field, all is
not well.

This patch fixes this by giving the bridge device an ops field
with an update_pmtu function.  For the moment I've left all
other fields blank but we can fill them in later should the
need arise.

Based on report and patch by Philip Craig.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&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>
As GRE tries to call the update_pmtu function on skb-&gt;dst and
bridge supplies an skb-&gt;dst that has a NULL ops field, all is
not well.

This patch fixes this by giving the bridge device an ops field
with an update_pmtu function.  For the moment I've left all
other fields blank but we can fill them in later should the
need arise.

Based on report and patch by Philip Craig.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netdev: add more functions to netdevice ops</title>
<updated>2008-11-21T04:14:53+00:00</updated>
<author>
<name>Stephen Hemminger</name>
<email>shemminger@vyatta.com</email>
</author>
<published>2008-11-21T04:14:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=008298231abbeb91bc7be9e8b078607b816d1a4a'/>
<id>008298231abbeb91bc7be9e8b078607b816d1a4a</id>
<content type='text'>
This patch moves neigh_setup and hard_start_xmit into the network device ops
structure. For bisection, fix all the previously converted drivers as well.
Bonding driver took the biggest hit on this.

Added a prefetch of the hard_start_xmit in the fast path to try and reduce
any impact this would have.

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.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 patch moves neigh_setup and hard_start_xmit into the network device ops
structure. For bisection, fix all the previously converted drivers as well.
Bonding driver took the biggest hit on this.

Added a prefetch of the hard_start_xmit in the fast path to try and reduce
any impact this would have.

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bridge: convert to net_device_ops</title>
<updated>2008-11-20T06:42:38+00:00</updated>
<author>
<name>Stephen Hemminger</name>
<email>shemminger@vyatta.com</email>
</author>
<published>2008-11-20T05:49:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a2dbb88210b9877f1c53d3798fd5d717a4d45256'/>
<id>a2dbb88210b9877f1c53d3798fd5d717a4d45256</id>
<content type='text'>
Convert to net_device_ops function table.

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.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>
Convert to net_device_ops function table.

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
