0002-bridge-keep-MAC-of-first-assigned-port.patch 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <[email protected]>
  3. Date: Thu, 14 Sep 2017 11:02:18 +0200
  4. Subject: [PATCH] bridge: keep MAC of first assigned port
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. original commit message:
  9. Default bridge changes MAC dynamically using smallest MAC of all
  10. connected ports (for no real reason). To avoid problems with ARP
  11. we simply use the MAC of the first connected port.
  12. Signed-off-by: Fabian Grünbichler <[email protected]>
  13. Signed-off-by: Thomas Lamprecht <[email protected]>
  14. ---
  15. net/bridge/br_stp_if.c | 5 +----
  16. 1 file changed, 1 insertion(+), 4 deletions(-)
  17. diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c
  18. index d174d3a566aa..885e18c72c87 100644
  19. --- a/net/bridge/br_stp_if.c
  20. +++ b/net/bridge/br_stp_if.c
  21. @@ -256,10 +256,7 @@ bool br_stp_recalculate_bridge_id(struct net_bridge *br)
  22. return false;
  23. list_for_each_entry(p, &br->port_list, list) {
  24. - if (addr == br_mac_zero ||
  25. - memcmp(p->dev->dev_addr, addr, ETH_ALEN) < 0)
  26. - addr = p->dev->dev_addr;
  27. -
  28. + addr = p->dev->dev_addr;
  29. }
  30. if (ether_addr_equal(br->bridge_id.addr, addr))