summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2015-06-06 20:14:58 +0000
committerian <ian@FreeBSD.org>2015-06-06 20:14:58 +0000
commitac9f7bc3c6a3d76b846574698062aab3d7b860f5 (patch)
tree8151a90416be91d053ae35fda59b518af77dc70b /sys/netinet
parent854a7e5a12872629f7a85a3aa116d6d5ffe85cda (diff)
downloadFreeBSD-src-ac9f7bc3c6a3d76b846574698062aab3d7b860f5.zip
FreeBSD-src-ac9f7bc3c6a3d76b846574698062aab3d7b860f5.tar.gz
MFC r279236:
Change struct attribute to avoid aligned operations mismatch Previous __alignment(4) allowed compiler to assume that operations are performed on aligned region. On ARM processor, this led to alignment fault
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/ip.h b/sys/netinet/ip.h
index 79afeb8..8487037 100644
--- a/sys/netinet/ip.h
+++ b/sys/netinet/ip.h
@@ -67,7 +67,7 @@ struct ip {
u_char ip_p; /* protocol */
u_short ip_sum; /* checksum */
struct in_addr ip_src,ip_dst; /* source and dest address */
-} __packed __aligned(4);
+} __packed __aligned(2);
#define IP_MAXPACKET 65535 /* maximum packet size */
OpenPOWER on IntegriCloud