2018-01-15 14:26:15 +03:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2017-09-14 12:31:29 +03:00
|
|
|
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
|
|
|
|
Date: Thu, 14 Sep 2017 11:02:18 +0200
|
2018-01-15 14:26:15 +03:00
|
|
|
Subject: [PATCH] bridge: keep MAC of first assigned port
|
2017-09-14 12:31:29 +03:00
|
|
|
MIME-Version: 1.0
|
|
|
|
Content-Type: text/plain; charset=UTF-8
|
|
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
|
|
|
|
original commit message:
|
|
|
|
|
|
|
|
Default bridge changes MAC dynamically using smallest MAC of all
|
|
|
|
connected ports (for no real reason). To avoid problems with ARP
|
|
|
|
we simply use the MAC of the first connected port.
|
|
|
|
|
|
|
|
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
2019-03-11 16:47:24 +03:00
|
|
|
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
2017-09-14 12:31:29 +03:00
|
|
|
---
|
|
|
|
net/bridge/br_stp_if.c | 5 +----
|
|
|
|
1 file changed, 1 insertion(+), 4 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c
|
2021-03-02 15:34:58 +03:00
|
|
|
index ba55851fe132..82675e1ecfb8 100644
|
2017-09-14 12:31:29 +03:00
|
|
|
--- a/net/bridge/br_stp_if.c
|
|
|
|
+++ b/net/bridge/br_stp_if.c
|
2021-03-02 15:34:58 +03:00
|
|
|
@@ -265,10 +265,7 @@ bool br_stp_recalculate_bridge_id(struct net_bridge *br)
|
2017-09-14 12:31:29 +03:00
|
|
|
return false;
|
|
|
|
|
|
|
|
list_for_each_entry(p, &br->port_list, list) {
|
|
|
|
- if (addr == br_mac_zero ||
|
|
|
|
- memcmp(p->dev->dev_addr, addr, ETH_ALEN) < 0)
|
|
|
|
- addr = p->dev->dev_addr;
|
|
|
|
-
|
|
|
|
+ addr = p->dev->dev_addr;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ether_addr_equal(br->bridge_id.addr, addr))
|