[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160920185737.GU8920@oracle.com>
Date: Tue, 20 Sep 2016 14:57:37 -0400
From: Sowmini Varadhan <sowmini.varadhan@...cle.com>
To: netdev@...r.kernel.org
Cc: sowmini.varadhan@...cle.com, jbenc@...hat.com, davem@...emloft.net,
hannes@...essinduktion.org
Subject: [PATCH net-next V2] net/vxlan: Avoid unaligned access in
vxlan_build_skb()
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 <sowmini.varadhan@...cle.com>
---
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
Powered by blists - more mailing lists