aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Martitz <[email protected]>2020-06-25 14:26:03 +0200
committerDavid S. Miller <[email protected]>2020-06-25 12:38:16 -0700
commit206e732323c2a8e6d11f4125a62c27e60a50a850 (patch)
treec3b6f4ee70a80f7d9c4d5ff8e7e548e46260679f
parent2570284060b48f3f79d8f1a2698792f36c385e9a (diff)
net: bridge: enfore alignment for ethernet address
The eth_addr member is passed to ether_addr functions that require 2-byte alignment, therefore the member must be properly aligned to avoid unaligned accesses. The problem is in place since the initial merge of multicast to unicast: commit 6db6f0eae6052b70885562e1733896647ec1d807 bridge: multicast to unicast Fixes: 6db6f0eae605 ("bridge: multicast to unicast") Cc: Roopa Prabhu <[email protected]> Cc: Nikolay Aleksandrov <[email protected]> Cc: David S. Miller <[email protected]> Cc: Jakub Kicinski <[email protected]> Cc: Felix Fietkau <[email protected]> Signed-off-by: Thomas Martitz <[email protected]> Acked-by: Nikolay Aleksandrov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
-rw-r--r--net/bridge/br_private.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index 7501be4eeba0..2130fe0194e6 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -217,8 +217,8 @@ struct net_bridge_port_group {
struct rcu_head rcu;
struct timer_list timer;
struct br_ip addr;
+ unsigned char eth_addr[ETH_ALEN] __aligned(2);
unsigned char flags;
- unsigned char eth_addr[ETH_ALEN];
};
struct net_bridge_mdb_entry {