<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/net/bridge, branch v3.2.60</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.2.60</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.2.60'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2014-06-09T12:28:58Z</updated>
<entry>
<title>bridge: Handle IFLA_ADDRESS correctly when creating bridge device</title>
<updated>2014-06-09T12:28:58Z</updated>
<author>
<name>Toshiaki Makita</name>
<email>makita.toshiaki@lab.ntt.co.jp</email>
</author>
<published>2014-04-25T08:01:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=084e4e55275849449a563b7b657c88caa97f8062'/>
<id>urn:sha1:084e4e55275849449a563b7b657c88caa97f8062</id>
<content type='text'>
[ Upstream commit 30313a3d5794472c3548d7288e306a5492030370 ]

When bridge device is created with IFLA_ADDRESS, we are not calling
br_stp_change_bridge_id(), which leads to incorrect local fdb
management and bridge id calculation, and prevents us from receiving
frames on the bridge device.

Reported-by: Tom Gundersen &lt;teg@jklm.no&gt;
Signed-off-by: Toshiaki Makita &lt;makita.toshiaki@lab.ntt.co.jp&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>netfilter: Can't fail and free after table replacement</title>
<updated>2014-06-09T12:28:55Z</updated>
<author>
<name>Thomas Graf</name>
<email>tgraf@suug.ch</email>
</author>
<published>2014-04-04T15:57:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a3bc0f8ea439762aa62d40a295157410498cbea7'/>
<id>urn:sha1:a3bc0f8ea439762aa62d40a295157410498cbea7</id>
<content type='text'>
commit c58dd2dd443c26d856a168db108a0cd11c285bf3 upstream.

All xtables variants suffer from the defect that the copy_to_user()
to copy the counters to user memory may fail after the table has
already been exchanged and thus exposed. Return an error at this
point will result in freeing the already exposed table. Any
subsequent packet processing will result in a kernel panic.

We can't copy the counters before exposing the new tables as we
want provide the counter state after the old table has been
unhooked. Therefore convert this into a silent error.

Cc: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: Thomas Graf &lt;tgraf@suug.ch&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>bridge: multicast: add sanity check for query source addresses</title>
<updated>2014-04-30T15:23:16Z</updated>
<author>
<name>Linus Lüssing</name>
<email>linus.luessing@web.de</email>
</author>
<published>2014-03-04T02:57:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=36672f6303a461e8dee4e1eab5a80bdfb31795f7'/>
<id>urn:sha1:36672f6303a461e8dee4e1eab5a80bdfb31795f7</id>
<content type='text'>
[ Upstream commit 6565b9eeef194afbb3beec80d6dd2447f4091f8c ]

MLD queries are supposed to have an IPv6 link-local source address
according to RFC2710, section 4 and RFC3810, section 5.1.14. This patch
adds a sanity check to ignore such broken MLD queries.

Without this check, such malformed MLD queries can result in a
denial of service: The queries are ignored by any MLD listener
therefore they will not respond with an MLD report. However,
without this patch these malformed MLD queries would enable the
snooping part in the bridge code, potentially shutting down the
according ports towards these hosts for multicast traffic as the
bridge did not learn about these listeners.

Reported-by: Jan Stancek &lt;jstancek@redhat.com&gt;
Signed-off-by: Linus Lüssing &lt;linus.luessing@web.de&gt;
Reviewed-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>bridge: use spin_lock_bh() in br_multicast_set_hash_max</title>
<updated>2014-02-15T19:20:10Z</updated>
<author>
<name>Curt Brune</name>
<email>curt@cumulusnetworks.com</email>
</author>
<published>2014-01-06T19:00:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f5d992e9ac16141f536d8cb96618df5b2a315667'/>
<id>urn:sha1:f5d992e9ac16141f536d8cb96618df5b2a315667</id>
<content type='text'>
[ Upstream commit fe0d692bbc645786bce1a98439e548ae619269f5 ]

br_multicast_set_hash_max() is called from process context in
net/bridge/br_sysfs_br.c by the sysfs store_hash_max() function.

br_multicast_set_hash_max() calls spin_lock(&amp;br-&gt;multicast_lock),
which can deadlock the CPU if a softirq that also tries to take the
same lock interrupts br_multicast_set_hash_max() while the lock is
held .  This can happen quite easily when any of the bridge multicast
timers expire, which try to take the same lock.

The fix here is to use spin_lock_bh(), preventing other softirqs from
executing on this CPU.

Steps to reproduce:

1. Create a bridge with several interfaces (I used 4).
2. Set the "multicast query interval" to a low number, like 2.
3. Enable the bridge as a multicast querier.
4. Repeatedly set the bridge hash_max parameter via sysfs.

  # brctl addbr br0
  # brctl addif br0 eth1 eth2 eth3 eth4
  # brctl setmcqi br0 2
  # brctl setmcquerier br0 1

  # while true ; do echo 4096 &gt; /sys/class/net/br0/bridge/hash_max; done

Signed-off-by: Curt Brune &lt;curt@cumulusnetworks.com&gt;
Signed-off-by: Scott Feldman &lt;sfeldma@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>bridge: flush br's address entry in fdb when remove the bridge dev</title>
<updated>2014-01-03T04:33:34Z</updated>
<author>
<name>Ding Tianhong</name>
<email>dingtianhong@huawei.com</email>
</author>
<published>2013-12-07T14:12:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=78d910855826dc20f3b763d8de54e04ad123d51b'/>
<id>urn:sha1:78d910855826dc20f3b763d8de54e04ad123d51b</id>
<content type='text'>
[ Upstream commit f873042093c0b418d2351fe142222b625c740149 ]

When the following commands are executed:

brctl addbr br0
ifconfig br0 hw ether &lt;addr&gt;
rmmod bridge

The calltrace will occur:

[  563.312114] device eth1 left promiscuous mode
[  563.312188] br0: port 1(eth1) entered disabled state
[  563.468190] kmem_cache_destroy bridge_fdb_cache: Slab cache still has objects
[  563.468197] CPU: 6 PID: 6982 Comm: rmmod Tainted: G           O 3.12.0-0.7-default+ #9
[  563.468199] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2007
[  563.468200]  0000000000000880 ffff88010f111e98 ffffffff814d1c92 ffff88010f111eb8
[  563.468204]  ffffffff81148efd ffff88010f111eb8 0000000000000000 ffff88010f111ec8
[  563.468206]  ffffffffa062a270 ffff88010f111ed8 ffffffffa063ac76 ffff88010f111f78
[  563.468209] Call Trace:
[  563.468218]  [&lt;ffffffff814d1c92&gt;] dump_stack+0x6a/0x78
[  563.468234]  [&lt;ffffffff81148efd&gt;] kmem_cache_destroy+0xfd/0x100
[  563.468242]  [&lt;ffffffffa062a270&gt;] br_fdb_fini+0x10/0x20 [bridge]
[  563.468247]  [&lt;ffffffffa063ac76&gt;] br_deinit+0x4e/0x50 [bridge]
[  563.468254]  [&lt;ffffffff810c7dc9&gt;] SyS_delete_module+0x199/0x2b0
[  563.468259]  [&lt;ffffffff814e0922&gt;] system_call_fastpath+0x16/0x1b
[  570.377958] Bridge firewalling registered

--------------------------- cut here -------------------------------

The reason is that when the bridge dev's address is changed, the
br_fdb_change_mac_address() will add new address in fdb, but when
the bridge was removed, the address entry in the fdb did not free,
the bridge_fdb_cache still has objects when destroy the cache, Fix
this by flushing the bridge address entry when removing the bridge.

v2: according to the Toshiaki Makita and Vlad's suggestion, I only
    delete the vlan0 entry, it still have a leak here if the vlan id
    is other number, so I need to call fdb_delete_by_port(br, NULL, 1)
    to flush all entries whose dst is NULL for the bridge.

Suggested-by: Toshiaki Makita &lt;toshiaki.makita1@gmail.com&gt;
Suggested-by: Vlad Yasevich &lt;vyasevich@gmail.com&gt;
Signed-off-by: Ding Tianhong &lt;dingtianhong@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>resubmit bridge: fix message_age_timer calculation</title>
<updated>2013-10-26T20:06:08Z</updated>
<author>
<name>Chris Healy</name>
<email>cphealy@gmail.com</email>
</author>
<published>2013-09-12T04:37:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=669c81001fd0bd914fb2a1c15ddbb427de8a8373'/>
<id>urn:sha1:669c81001fd0bd914fb2a1c15ddbb427de8a8373</id>
<content type='text'>
[ Upstream commit 9a0620133ccce9dd35c00a96405c8d80938c2cc0 ]

This changes the message_age_timer calculation to use the BPDU's max age as
opposed to the local bridge's max age.  This is in accordance with section
8.6.2.3.2 Step 2 of the 802.1D-1998 sprecification.

With the current implementation, when running with very large bridge
diameters, convergance will not always occur even if a root bridge is
configured to have a longer max age.

Tested successfully on bridge diameters of ~200.

Signed-off-by: Chris Healy &lt;cphealy@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>net: bridge: convert MLDv2 Query MRC into msecs_to_jiffies for max_delay</title>
<updated>2013-10-26T20:05:57Z</updated>
<author>
<name>Daniel Borkmann</name>
<email>dborkman@redhat.com</email>
</author>
<published>2013-08-29T21:55:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f99d61dcdd2e1354ef54bbaee5ae71af926fa718'/>
<id>urn:sha1:f99d61dcdd2e1354ef54bbaee5ae71af926fa718</id>
<content type='text'>
[ Upstream commit 2d98c29b6fb3de44d9eaa73c09f9cf7209346383 ]

While looking into MLDv1/v2 code, I noticed that bridging code does
not convert it's max delay into jiffies for MLDv2 messages as we do
in core IPv6' multicast code.

RFC3810, 5.1.3. Maximum Response Code says:

  The Maximum Response Code field specifies the maximum time allowed
  before sending a responding Report. The actual time allowed, called
  the Maximum Response Delay, is represented in units of milliseconds,
  and is derived from the Maximum Response Code as follows: [...]

As we update timers that work with jiffies, we need to convert it.

Signed-off-by: Daniel Borkmann &lt;dborkman@redhat.com&gt;
Cc: Linus Lüssing &lt;linus.luessing@web.de&gt;
Cc: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>bridge: fix switched interval for MLD Query types</title>
<updated>2013-08-02T20:14:44Z</updated>
<author>
<name>Linus Lüssing</name>
<email>linus.luessing@web.de</email>
</author>
<published>2013-06-16T21:20:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b14bf7d412c63595f3f26f669437286b873e11a7'/>
<id>urn:sha1:b14bf7d412c63595f3f26f669437286b873e11a7</id>
<content type='text'>
[ Upstream commit 32de868cbc6bee010d2cee95b5071b25ecbec8c3 ]

General Queries (the one with the Multicast Address field
set to zero / '::') are supposed to have a Maximum Response Delay
of [Query Response Interval], while for Multicast-Address-Specific
Queries it is [Last Listener Query Interval] - not the other way
round. (see RFC2710, section 7.3+7.8)

Signed-off-by: Linus Lüssing &lt;linus.luessing@web.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>bridge: fix race with topology change timer</title>
<updated>2013-05-30T13:35:12Z</updated>
<author>
<name>stephen hemminger</name>
<email>stephen@networkplumber.org</email>
</author>
<published>2013-05-02T14:23:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e55ab1122b0077d494bd6576513d4952e17bc3ce'/>
<id>urn:sha1:e55ab1122b0077d494bd6576513d4952e17bc3ce</id>
<content type='text'>
[ Upstream commit 83401eb4990ff6af55aeed8f49681558544192e6 ]

A bridge should only send topology change notice if it is not
the root bridge. It is possible for message age timer to elect itself
as a new root bridge, and still have a topology change timer running
but waiting for bridge lock on other CPU.

Solve the race by checking if we are root bridge before continuing.
This was the root cause of the cases where br_send_tcn_bpdu would OOPS.

Reported-by: JerryKang &lt;jerry.kang@samsung.com&gt;
Signed-off-by: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>bridge: set priority of STP packets</title>
<updated>2013-03-06T03:24:19Z</updated>
<author>
<name>Stephen Hemminger</name>
<email>stephen@networkplumber.org</email>
</author>
<published>2013-02-11T08:22:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1642974c7f646c8a32bc7a15d37f4e14ceead334'/>
<id>urn:sha1:1642974c7f646c8a32bc7a15d37f4e14ceead334</id>
<content type='text'>
[ Upstream commit 547b4e718115eea74087e28d7fa70aec619200db ]

Spanning Tree Protocol packets should have always been marked as
control packets, this causes them to get queued in the high prirority
FIFO. As Radia Perlman mentioned in her LCA talk, STP dies if bridge
gets overloaded and can't communicate. This is a long-standing bug back
to the first versions of Linux bridge.

Signed-off-by: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
</feed>
