aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/syncookies.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ipv6/syncookies.c b/net/ipv6/syncookies.c
index be291baa2ec2..52cc8cb02c0c 100644
--- a/net/ipv6/syncookies.c
+++ b/net/ipv6/syncookies.c
@@ -166,7 +166,6 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb)
166 int mss; 166 int mss;
167 struct dst_entry *dst; 167 struct dst_entry *dst;
168 __u8 rcv_wscale; 168 __u8 rcv_wscale;
169 bool ecn_ok = false;
170 169
171 if (!sysctl_tcp_syncookies || !th->ack || th->rst) 170 if (!sysctl_tcp_syncookies || !th->ack || th->rst)
172 goto out; 171 goto out;
@@ -186,7 +185,7 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb)
186 memset(&tcp_opt, 0, sizeof(tcp_opt)); 185 memset(&tcp_opt, 0, sizeof(tcp_opt));
187 tcp_parse_options(skb, &tcp_opt, 0, NULL); 186 tcp_parse_options(skb, &tcp_opt, 0, NULL);
188 187
189 if (!cookie_check_timestamp(&tcp_opt, sock_net(sk), &ecn_ok)) 188 if (!cookie_timestamp_decode(&tcp_opt))
190 goto out; 189 goto out;
191 190
192 ret = NULL; 191 ret = NULL;
@@ -223,7 +222,6 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb)
223 222
224 req->expires = 0UL; 223 req->expires = 0UL;
225 req->num_retrans = 0; 224 req->num_retrans = 0;
226 ireq->ecn_ok = ecn_ok;
227 ireq->snd_wscale = tcp_opt.snd_wscale; 225 ireq->snd_wscale = tcp_opt.snd_wscale;
228 ireq->sack_ok = tcp_opt.sack_ok; 226 ireq->sack_ok = tcp_opt.sack_ok;
229 ireq->wscale_ok = tcp_opt.wscale_ok; 227 ireq->wscale_ok = tcp_opt.wscale_ok;
@@ -264,6 +262,7 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb)
264 dst_metric(dst, RTAX_INITRWND)); 262 dst_metric(dst, RTAX_INITRWND));
265 263
266 ireq->rcv_wscale = rcv_wscale; 264 ireq->rcv_wscale = rcv_wscale;
265 ireq->ecn_ok = cookie_ecn_ok(&tcp_opt, sock_net(sk));
267 266
268 ret = get_cookie_sock(sk, skb, req, dst); 267 ret = get_cookie_sock(sk, skb, req, dst);
269out: 268out: