Merge branches 'for-3.18/upstream-fixes' and 'for-3.19/upstream' into for-linus
[firefly-linux-kernel-4.4.55.git] / net / ipv6 / syncookies.c
index 9a2838e93cc5dc2f901c64373378a6dee3533235..2f25cb6347ca556a8c7418e327bbff2a715c1e6a 100644 (file)
@@ -67,7 +67,7 @@ static u32 cookie_hash(const struct in6_addr *saddr, const struct in6_addr *dadd
 
        net_get_random_once(syncookie6_secret, sizeof(syncookie6_secret));
 
-       tmp  = __get_cpu_var(ipv6_cookie_scratch);
+       tmp  = this_cpu_ptr(ipv6_cookie_scratch);
 
        /*
         * we have 320 bits of information to hash, copy in the remaining
@@ -214,7 +214,7 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb)
        /* So that link locals have meaning */
        if (!sk->sk_bound_dev_if &&
            ipv6_addr_type(&ireq->ir_v6_rmt_addr) & IPV6_ADDR_LINKLOCAL)
-               ireq->ir_iif = inet6_iif(skb);
+               ireq->ir_iif = tcp_v6_iif(skb);
 
        ireq->ir_mark = inet_request_mark(sk, skb);