summaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_gre.c
diff options
context:
space:
mode:
authorWilliam Tu <u9012063@gmail.com>2017-12-15 23:27:43 +0100
committerDavid S. Miller <davem@davemloft.net>2017-12-18 21:11:25 +0100
commitae3e13373b879670d873e5657a903bd208f0dc40 (patch)
tree90eaf8a48762d72aef82758d5961159a042e14af /net/ipv6/ip6_gre.c
parentMerge branch 'sfp-phylink-fixes' (diff)
downloadlinux-ae3e13373b879670d873e5657a903bd208f0dc40.tar.xz
linux-ae3e13373b879670d873e5657a903bd208f0dc40.zip
net: erspan: fix wrong return value
If pskb_may_pull return failed, return PACKET_REJECT instead of -ENOMEM. Fixes: 94d7d8f29287 ("ip6_gre: add erspan v2 support") Fixes: f551c91de262 ("net: erspan: introduce erspan v2 for ip_gre") Signed-off-by: William Tu <u9012063@gmail.com> Cc: Haishuang Yan <yanhaishuang@cmss.chinamobile.com> Acked-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_gre.c')
-rw-r--r--net/ipv6/ip6_gre.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index 5c9c65f1d5c2..b3e4e0384f36 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -524,7 +524,7 @@ static int ip6erspan_rcv(struct sk_buff *skb, int gre_hdr_len,
int len = erspan_hdr_len(ver);
if (unlikely(!pskb_may_pull(skb, len)))
- return -ENOMEM;
+ return PACKET_REJECT;
if (__iptunnel_pull_header(skb, len,
htons(ETH_P_TEB),