Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Jun 2015 20:14:59 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r284099 - stable/10/sys/netinet
Message-ID:  <201506062014.t56KExfb047996@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ian
Date: Sat Jun  6 20:14:58 2015
New Revision: 284099
URL: https://svnweb.freebsd.org/changeset/base/284099

Log:
  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

Modified:
  stable/10/sys/netinet/ip.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet/ip.h
==============================================================================
--- stable/10/sys/netinet/ip.h	Sat Jun  6 20:01:06 2015	(r284098)
+++ stable/10/sys/netinet/ip.h	Sat Jun  6 20:14:58 2015	(r284099)
@@ -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 */
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506062014.t56KExfb047996>