Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 137587
b: refs/heads/master
c: 284904a
h: refs/heads/master
i:
  137585: e39a811
  137583: 94c58db
v: v3
  • Loading branch information
Paul Moore authored and James Morris committed Mar 28, 2009
1 parent 814ebe2 commit 5e80e1a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bb798169d1bb860b07192cf9c75937fadc8610b4
refs/heads/master: 284904aa79466a4736f4c775fdbe5c7407fa136c
9 changes: 5 additions & 4 deletions trunk/net/ipv4/syncookies.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,6 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
if (!req)
goto out;

if (security_inet_conn_request(sk, skb, req)) {
reqsk_free(req);
goto out;
}
ireq = inet_rsk(req);
treq = tcp_rsk(req);
treq->rcv_isn = ntohl(th->seq) - 1;
Expand Down Expand Up @@ -322,6 +318,11 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
}
}

if (security_inet_conn_request(sk, skb, req)) {
reqsk_free(req);
goto out;
}

req->expires = 0UL;
req->retrans = 0;

Expand Down
7 changes: 4 additions & 3 deletions trunk/net/ipv4/tcp_ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -1230,14 +1230,15 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb)

tcp_openreq_init(req, &tmp_opt, skb);

if (security_inet_conn_request(sk, skb, req))
goto drop_and_free;

ireq = inet_rsk(req);
ireq->loc_addr = daddr;
ireq->rmt_addr = saddr;
ireq->no_srccheck = inet_sk(sk)->transparent;
ireq->opt = tcp_v4_save_options(sk, skb);

if (security_inet_conn_request(sk, skb, req))
goto drop_and_free;

if (!want_cookie)
TCP_ECN_create_request(req, tcp_hdr(skb));

Expand Down

0 comments on commit 5e80e1a

Please sign in to comment.