datapath: Fix MPLS action validation.
[cascardo/ovs.git] / datapath / linux / compat / include / net / gre.h
index b4bf2f1..494702e 100644 (file)
@@ -107,7 +107,8 @@ static inline int ip_gre_calc_hlen(__be16 o_flags)
 static inline struct sk_buff *rpl_gre_handle_offloads(struct sk_buff *skb,
                                                  bool gre_csum)
 {
-       if (skb->encapsulation && skb_is_gso(skb)) {
+       if ((ovs_skb_get_inner_protocol(skb) || skb->encapsulation) &&
+           skb_is_gso(skb)) {
                kfree_skb(skb);
                return ERR_PTR(-ENOSYS);
        }