From: Jiri Benc <jbenc@redhat.com>
To: netdev@vger.kernel.org
Cc: Simon Horman <simon.horman@netronome.com>
Subject: [PATCH net-next] vxlan: set mac_header correctly in GPE mode
Date: Wed, 11 May 2016 15:55:06 +0200 [thread overview]
Message-ID: <3b9c5ffd8085c0af7072960865883a23be0d0a32.1462974886.git.jbenc@redhat.com> (raw)
For VXLAN-GPE, the interface is ARPHRD_NONE, thus we need to reset
mac_header after pulling the outer header.
Fixes: e1e5314de08b ("vxlan: implement GPE")
Signed-off-by: Jiri Benc <jbenc@redhat.com>
---
drivers/net/vxlan.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 2f29d20aa08f..e030a804b772 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1338,6 +1338,8 @@ static int vxlan_rcv(struct sock *sk, struct sk_buff *skb)
if (__iptunnel_pull_header(skb, VXLAN_HLEN, protocol, raw_proto,
!net_eq(vxlan->net, dev_net(vxlan->dev))))
goto drop;
+ if (raw_proto)
+ skb_reset_mac_header(skb);
if (vxlan_collect_metadata(vs)) {
__be32 vni = vxlan_vni(vxlan_hdr(skb)->vx_vni);
--
1.8.3.1
next reply other threads:[~2016-05-11 13:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-11 13:55 Jiri Benc [this message]
2016-05-12 6:47 ` [PATCH net-next] vxlan: set mac_header correctly in GPE mode Shmulik Ladkani
2016-05-12 9:07 ` Jiri Benc
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=3b9c5ffd8085c0af7072960865883a23be0d0a32.1462974886.git.jbenc@redhat.com \
--to=jbenc@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=simon.horman@netronome.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).