summaryrefslogtreecommitdiffstats
path: root/net/mpls/mpls_gso.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mpls/mpls_gso.c')
-rw-r--r--net/mpls/mpls_gso.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mpls/mpls_gso.c b/net/mpls/mpls_gso.c
index 1482259de..40334d4d8 100644
--- a/net/mpls/mpls_gso.c
+++ b/net/mpls/mpls_gso.c
@@ -26,6 +26,9 @@ static struct sk_buff *mpls_gso_segment(struct sk_buff *skb,
__be16 mpls_protocol;
unsigned int mpls_hlen;
+ if (!skb_inner_network_header_was_set(skb))
+ goto out;
+
skb_reset_network_header(skb);
mpls_hlen = skb_inner_network_header(skb) - skb_network_header(skb);
if (unlikely(!mpls_hlen || mpls_hlen % MPLS_HLEN))