Skip to content

Commit ed779fe

Browse files
LGA1150kuba-moo
authored andcommitted
neighbour: fix unaligned access to pneigh_entry
After the blamed commit, the member key is longer 4-byte aligned. On platforms that do not support unaligned access, e.g., MIPS32R2 with unaligned_action set to 1, this will trigger a crash when accessing an IPv6 pneigh_entry, as the key is cast to an in6_addr pointer. Change the type of the key to u32 to make it aligned. Fixes: 62dd931 ("[IPV6] NDISC: Set per-entry is_router flag in Proxy NA.") Signed-off-by: Qingfang DENG <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 714069d commit ed779fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/net/neighbour.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ struct pneigh_entry {
180180
netdevice_tracker dev_tracker;
181181
u32 flags;
182182
u8 protocol;
183-
u8 key[];
183+
u32 key[];
184184
};
185185

186186
/*

0 commit comments

Comments
 (0)