Commit be59ef03 authored by David S. Miller's avatar David S. Miller

[IPV4]: Fix unaligned accesses in arp_tables.c

parent 95fec628
...@@ -179,11 +179,10 @@ static inline int arp_packet_match(const struct arphdr *arphdr, ...@@ -179,11 +179,10 @@ static inline int arp_packet_match(const struct arphdr *arphdr,
return 0; return 0;
} }
/* Look for ifname matches; this should unroll nicely. */ /* Look for ifname matches. */
for (i = 0, ret = 0; i < IFNAMSIZ/sizeof(unsigned long); i++) { for (i = 0, ret = 0; i < IFNAMSIZ/sizeof(unsigned long); i++) {
ret |= (((const unsigned long *)indev)[i] ret |= (indev[i] ^ arpinfo->iniface[i])
^ ((const unsigned long *)arpinfo->iniface)[i]) & arpinfo->iniface_mask[i];
& ((const unsigned long *)arpinfo->iniface_mask)[i];
} }
if (FWINV(ret != 0, ARPT_INV_VIA_IN)) { if (FWINV(ret != 0, ARPT_INV_VIA_IN)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment