|
@@ -1571,6 +1571,19 @@ static bool route_shortcircuit(struct net_device *dev, struct sk_buff *skb)
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
+bool vxlan_gso_check(struct sk_buff *skb)
|
|
|
+{
|
|
|
+ if ((skb_shinfo(skb)->gso_type & SKB_GSO_UDP_TUNNEL) &&
|
|
|
+ (skb->inner_protocol_type != ENCAP_TYPE_ETHER ||
|
|
|
+ skb->inner_protocol != htons(ETH_P_TEB) ||
|
|
|
+ (skb_inner_mac_header(skb) - skb_transport_header(skb) !=
|
|
|
+ sizeof(struct udphdr) + sizeof(struct vxlanhdr))))
|
|
|
+ return false;
|
|
|
+
|
|
|
+ return true;
|
|
|
+}
|
|
|
+EXPORT_SYMBOL_GPL(vxlan_gso_check);
|
|
|
+
|
|
|
#if IS_ENABLED(CONFIG_IPV6)
|
|
|
static int vxlan6_xmit_skb(struct vxlan_sock *vs,
|
|
|
struct dst_entry *dst, struct sk_buff *skb,
|