Revert Backoff [v3]: Rename skb to icmp_skb in tcp_v4_err()
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / net / ipv4 / tcp_ipv4.c
index 5a1ca2698c885775914f05fe17ae45d485cbddd2..6ca1bc8c3025fc652e425cb82bcab49baae05618 100644 (file)
@@ -328,26 +328,26 @@ static void do_pmtu_discovery(struct sock *sk, struct iphdr *iph, u32 mtu)
  *
  */
 
-void tcp_v4_err(struct sk_buff *skb, u32 info)
+void tcp_v4_err(struct sk_buff *icmp_skb, u32 info)
 {
-       struct iphdr *iph = (struct iphdr *)skb->data;
-       struct tcphdr *th = (struct tcphdr *)(skb->data + (iph->ihl << 2));
+       struct iphdr *iph = (struct iphdr *)icmp_skb->data;
+       struct tcphdr *th = (struct tcphdr *)(icmp_skb->data + (iph->ihl << 2));
        struct tcp_sock *tp;
        struct inet_sock *inet;
-       const int type = icmp_hdr(skb)->type;
-       const int code = icmp_hdr(skb)->code;
+       const int type = icmp_hdr(icmp_skb)->type;
+       const int code = icmp_hdr(icmp_skb)->code;
        struct sock *sk;
        __u32 seq;
        int err;
-       struct net *net = dev_net(skb->dev);
+       struct net *net = dev_net(icmp_skb->dev);
 
-       if (skb->len < (iph->ihl << 2) + 8) {
+       if (icmp_skb->len < (iph->ihl << 2) + 8) {
                ICMP_INC_STATS_BH(net, ICMP_MIB_INERRORS);
                return;
        }
 
        sk = inet_lookup(net, &tcp_hashinfo, iph->daddr, th->dest,
-                       iph->saddr, th->source, inet_iif(skb));
+                       iph->saddr, th->source, inet_iif(icmp_skb));
        if (!sk) {
                ICMP_INC_STATS_BH(net, ICMP_MIB_INERRORS);
                return;
@@ -1160,6 +1160,7 @@ struct request_sock_ops tcp_request_sock_ops __read_mostly = {
 #ifdef CONFIG_TCP_MD5SIG
 static struct tcp_request_sock_ops tcp_request_sock_ipv4_ops = {
        .md5_lookup     =       tcp_v4_reqsk_md5_lookup,
+       .calc_md5_hash  =       tcp_v4_md5_hash_skb,
 };
 #endif
 
@@ -1373,7 +1374,7 @@ struct sock *tcp_v4_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
                 */
                char *newkey = kmemdup(key->key, key->keylen, GFP_ATOMIC);
                if (newkey != NULL)
-                       tcp_v4_md5_do_add(newsk, inet_sk(sk)->daddr,
+                       tcp_v4_md5_do_add(newsk, newinet->daddr,
                                          newkey, key->keylen);
                newsk->sk_route_caps &= ~NETIF_F_GSO_MASK;
        }