diff options
author | Thomas Martitz <t.martitz@avm.de> | 2020-06-25 14:26:03 +0200 |
---|---|---|
committer | Sasha Levin <sashal@kernel.org> | 2020-06-30 15:37:58 -0400 |
commit | bc0feec2bc26f09d263fa20e22dccbe569cacf58 (patch) | |
tree | 1ae8cb6ec54cec024978868aba93792d4df8779e /net/bridge | |
parent | c24d430285c5e668e9688d3e2c7c990aea8ea61f (diff) | |
download | linux-stable-bc0feec2bc26f09d263fa20e22dccbe569cacf58.tar.gz linux-stable-bc0feec2bc26f09d263fa20e22dccbe569cacf58.tar.bz2 linux-stable-bc0feec2bc26f09d263fa20e22dccbe569cacf58.zip |
net: bridge: enfore alignment for ethernet address
[ Upstream commit db7202dec92e6caa2706c21d6fc359af318bde2e ]
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 <roopa@cumulusnetworks.com>
Cc: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Felix Fietkau <nbd@nbd.name>
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Martitz <t.martitz@avm.de>
Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_private.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index e870cfc85b14..14ff034e561c 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h @@ -190,8 +190,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 |