Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
[firefly-linux-kernel-4.4.55.git] / net / ipv4 / af_inet.c
index b8bc1a3d5cf1446dc57f0e57927c5224736b9f9c..ecd2c3f245ce2b2e0b79f17417c5e6ad8c70abf6 100644 (file)
@@ -1391,9 +1391,15 @@ static struct sk_buff **inet_gro_receive(struct sk_buff **head,
                NAPI_GRO_CB(p)->flush |=
                        (iph->ttl ^ iph2->ttl) |
                        (iph->tos ^ iph2->tos) |
-                       (__force int)((iph->frag_off ^ iph2->frag_off) & htons(IP_DF)) |
-                       ((u16)(ntohs(iph2->id) + NAPI_GRO_CB(p)->count) ^ id);
+                       ((iph->frag_off ^ iph2->frag_off) & htons(IP_DF));
 
+               /* Save the IP ID check to be included later when we get to
+                * the transport layer so only the inner most IP ID is checked.
+                * This is because some GSO/TSO implementations do not
+                * correctly increment the IP ID for the outer hdrs.
+                */
+               NAPI_GRO_CB(p)->flush_id =
+                           ((u16)(ntohs(iph2->id) + NAPI_GRO_CB(p)->count) ^ id);
                NAPI_GRO_CB(p)->flush |= flush;
        }
 
@@ -1539,6 +1545,7 @@ static const struct net_protocol tcp_protocol = {
        .err_handler    =       tcp_v4_err,
        .no_policy      =       1,
        .netns_ok       =       1,
+       .icmp_strict_tag_validation = 1,
 };
 
 static const struct net_protocol udp_protocol = {