Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 437c5b53 authored by Neal Cardwell's avatar Neal Cardwell Committed by David S. Miller
Browse files

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: default avatarNeal Cardwell <ncardwell@google.com>
Acked-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fa809e2f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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,