syncookies: only increment SYNCOOKIESFAILED on validation error
[deliverable/linux.git] / net / ipv6 / syncookies.c
index 0e26e795b703cee7ca2367b397966444c1403b05..be291baa2ec2e181b7aefd7b006ef401804d67c0 100644 (file)
@@ -171,8 +171,11 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb)
        if (!sysctl_tcp_syncookies || !th->ack || th->rst)
                goto out;
 
-       if (tcp_synq_no_recent_overflow(sk) ||
-               (mss = __cookie_v6_check(ipv6_hdr(skb), th, cookie)) == 0) {
+       if (tcp_synq_no_recent_overflow(sk))
+               goto out;
+
+       mss = __cookie_v6_check(ipv6_hdr(skb), th, cookie);
+       if (mss == 0) {
                NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_SYNCOOKIESFAILED);
                goto out;
        }
This page took 0.025994 seconds and 5 git commands to generate.