From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
To: netdev@vger.kernel.org
Cc: sowmini.varadhan@oracle.com, jbenc@redhat.com,
davem@davemloft.net, hannes@stressinduktion.org
Subject: [PATCH net-next V2] net/vxlan: Avoid unaligned access in vxlan_build_skb()
Date: Tue, 20 Sep 2016 14:57:37 -0400 [thread overview]
Message-ID: <20160920185737.GU8920@oracle.com> (raw)
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@oracle.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
next reply other threads:[~2016-09-20 18:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-20 18:57 Sowmini Varadhan [this message]
2016-09-21 9:43 ` [PATCH net-next V2] net/vxlan: Avoid unaligned access in vxlan_build_skb() Jiri Benc
2016-09-21 10:10 ` Hannes Frederic Sowa
2016-09-21 16:14 ` Alexei Starovoitov
2016-09-21 16:49 ` Hannes Frederic Sowa
2016-09-21 16:53 ` Eric Dumazet
2016-09-21 17:12 ` Alexei Starovoitov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160920185737.GU8920@oracle.com \
--to=sowmini.varadhan@oracle.com \
--cc=davem@davemloft.net \
--cc=hannes@stressinduktion.org \
--cc=jbenc@redhat.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.