mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-27 06:04:23 +08:00
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: commit6db6f0eae6
bridge: multicast to unicast Fixes:6db6f0eae6
("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> 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>
This commit is contained in:
parent
2570284060
commit
206e732323
@ -217,8 +217,8 @@ struct net_bridge_port_group {
|
|||||||
struct rcu_head rcu;
|
struct rcu_head rcu;
|
||||||
struct timer_list timer;
|
struct timer_list timer;
|
||||||
struct br_ip addr;
|
struct br_ip addr;
|
||||||
|
unsigned char eth_addr[ETH_ALEN] __aligned(2);
|
||||||
unsigned char flags;
|
unsigned char flags;
|
||||||
unsigned char eth_addr[ETH_ALEN];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct net_bridge_mdb_entry {
|
struct net_bridge_mdb_entry {
|
||||||
|
Loading…
Reference in New Issue
Block a user