From: Neal Cardwell Date: Sat, 23 Jun 2012 19:22:00 +0000 (+0000) Subject: tcp: heed result of security_inet_conn_request() in tcp_v6_conn_request() X-Git-Tag: v3.5-rc5~17^2~16 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=437c5b53f63b468996090200df66ef2f3f588c80;p=~emulex%2Finfiniband.git tcp: heed result of security_inet_conn_request() in tcp_v6_conn_request() 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 Acked-by: Eric Dumazet Signed-off-by: David S. Miller --- diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 3a9aec29581..9df64a50b07 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c @@ -1212,7 +1212,8 @@ have_isn: 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,