summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Benc <jbenc@redhat.com>2016-04-11 17:06:08 +0200
committerDavid S. Miller <davem@davemloft.net>2016-04-11 15:01:56 -0400
commit61618eeac3e6165684895481c4f58ea879c3d616 (patch)
treeff2e8e2703844316221641dc7c45b4c2c0536138
parente0897ae3ec720b1653d4ff9aaf48b532c276ab63 (diff)
vxlan: fix incorrect type
The protocol is 16bit, not 32bit. Fixes: e1e5314de08ba ("vxlan: implement GPE") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/vxlan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 9f3634064c92..7f697a3f00a4 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1181,7 +1181,7 @@ out:
}
static bool vxlan_parse_gpe_hdr(struct vxlanhdr *unparsed,
- __be32 *protocol,
+ __be16 *protocol,
struct sk_buff *skb, u32 vxflags)
{
struct vxlanhdr_gpe *gpe = (struct vxlanhdr_gpe *)unparsed;
@@ -1284,7 +1284,7 @@ static int vxlan_rcv(struct sock *sk, struct sk_buff *skb)
struct vxlanhdr unparsed;
struct vxlan_metadata _md;
struct vxlan_metadata *md = &_md;
- __be32 protocol = htons(ETH_P_TEB);
+ __be16 protocol = htons(ETH_P_TEB);
bool raw_proto = false;
void *oiph;