Skip to content

Commit

Permalink
tcp: heed result of security_inet_conn_request() in tcp_v6_conn_reque…
Browse files Browse the repository at this point in the history
…st()

If security_inet_conn_request() returns non-zero then TCP/IPv6 should
drop the request, just as in TCP/IPv4 and DCCP in both IPv4 and IPv6.

Signed-off-by: Neal Cardwell <[email protected]>
Acked-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
nealcardwell authored and davem330 committed Jun 25, 2012
1 parent fa809e2 commit 437c5b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/ipv6/tcp_ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,8 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
tcp_rsk(req)->snt_isn = isn;
tcp_rsk(req)->snt_synack = tcp_time_stamp;

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

if (tcp_v6_send_synack(sk, req,
(struct request_values *)&tmp_ext,
Expand Down

0 comments on commit 437c5b5

Please sign in to comment.