|
@@ -1380,6 +1380,19 @@ out:
|
|
|
return pp;
|
|
|
}
|
|
|
|
|
|
+static struct sk_buff **ipip_gro_receive(struct sk_buff **head,
|
|
|
+ struct sk_buff *skb)
|
|
|
+{
|
|
|
+ if (NAPI_GRO_CB(skb)->encap_mark) {
|
|
|
+ NAPI_GRO_CB(skb)->flush = 1;
|
|
|
+ return NULL;
|
|
|
+ }
|
|
|
+
|
|
|
+ NAPI_GRO_CB(skb)->encap_mark = 1;
|
|
|
+
|
|
|
+ return inet_gro_receive(head, skb);
|
|
|
+}
|
|
|
+
|
|
|
#define SECONDS_PER_DAY 86400
|
|
|
|
|
|
/* inet_current_timestamp - Return IP network timestamp
|
|
@@ -1448,6 +1461,13 @@ out_unlock:
|
|
|
return err;
|
|
|
}
|
|
|
|
|
|
+static int ipip_gro_complete(struct sk_buff *skb, int nhoff)
|
|
|
+{
|
|
|
+ skb->encapsulation = 1;
|
|
|
+ skb_shinfo(skb)->gso_type |= SKB_GSO_IPIP;
|
|
|
+ return inet_gro_complete(skb, nhoff);
|
|
|
+}
|
|
|
+
|
|
|
int inet_ctl_sock_create(struct sock **sk, unsigned short family,
|
|
|
unsigned short type, unsigned char protocol,
|
|
|
struct net *net)
|
|
@@ -1675,8 +1695,8 @@ static struct packet_offload ip_packet_offload __read_mostly = {
|
|
|
static const struct net_offload ipip_offload = {
|
|
|
.callbacks = {
|
|
|
.gso_segment = inet_gso_segment,
|
|
|
- .gro_receive = inet_gro_receive,
|
|
|
- .gro_complete = inet_gro_complete,
|
|
|
+ .gro_receive = ipip_gro_receive,
|
|
|
+ .gro_complete = ipip_gro_complete,
|
|
|
},
|
|
|
};
|
|
|
|