Subject: [PATCH net-next V2] net/vxlan: Avoid unaligned access in vxlan_build_skb()

From: Sowmini Varadhan <[email-masked]>
Date: Tue, 20 Sep 2016 14:57:37 -0400

The vxlan header may not be aligned to 4 bytes in
vxlan_build_skb (e.g., for MLD packets). This patch
avoids unaligned access traps from vxlan_build_skb
(in platforms like sparc) by making struct vxlanhdr __packed.

Signed-off-by: Sowmini Varadhan <[email-masked]>
---
 include/net/vxlan.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/net/vxlan.h b/include/net/vxlan.h
index 0255613..1ec56f4 100644
--- a/include/net/vxlan.h
+++ b/include/net/vxlan.h
@@ -18,7 +18,7 @@
 struct vxlanhdr {
 	__be32 vx_flags;
 	__be32 vx_vni;
-};
+} __packed;
 
 /* VXLAN header flags. */
 #define VXLAN_HF_VNI	cpu_to_be32(BIT(27))
-- 
1.7.1