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 6b1193e63911203e95dfb1ab891bace2b65d99c4..ecd2c3f245ce2b2e0b79f17417c5e6ad8c70abf6 100644 (file)
@@ -1130,7 +1130,7 @@ static int inet_sk_reselect_saddr(struct sock *sk)
        fl4 = &inet->cork.fl.u.ip4;
        rt = ip_route_connect(fl4, daddr, 0, RT_CONN_FLAGS(sk),
                              sk->sk_bound_dev_if, sk->sk_protocol,
-                             inet->inet_sport, inet->inet_dport, sk, false);
+                             inet->inet_sport, inet->inet_dport, sk);
        if (IS_ERR(rt))
                return PTR_ERR(rt);
 
@@ -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 = {