diff options
Diffstat (limited to 'net/ipv4/syncookies.c')
-rw-r--r-- | net/ipv4/syncookies.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c index d346c22aa6ae..b35a950d2e06 100644 --- a/net/ipv4/syncookies.c +++ b/net/ipv4/syncookies.c | |||
@@ -288,10 +288,6 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb, | |||
288 | if (!req) | 288 | if (!req) |
289 | goto out; | 289 | goto out; |
290 | 290 | ||
291 | if (security_inet_conn_request(sk, skb, req)) { | ||
292 | reqsk_free(req); | ||
293 | goto out; | ||
294 | } | ||
295 | ireq = inet_rsk(req); | 291 | ireq = inet_rsk(req); |
296 | treq = tcp_rsk(req); | 292 | treq = tcp_rsk(req); |
297 | treq->rcv_isn = ntohl(th->seq) - 1; | 293 | treq->rcv_isn = ntohl(th->seq) - 1; |
@@ -322,6 +318,11 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb, | |||
322 | } | 318 | } |
323 | } | 319 | } |
324 | 320 | ||
321 | if (security_inet_conn_request(sk, skb, req)) { | ||
322 | reqsk_free(req); | ||
323 | goto out; | ||
324 | } | ||
325 | |||
325 | req->expires = 0UL; | 326 | req->expires = 0UL; |
326 | req->retrans = 0; | 327 | req->retrans = 0; |
327 | 328 | ||