KOVACS Krisztian 7a682575ad netfilter: xt_socket: fix transparent match for IPv6 request sockets
The introduction of TCP_NEW_SYN_RECV state, and the addition of request
sockets to the ehash table seems to have broken the --transparent option
of the socket match for IPv6 (around commit a9407000).

Now that the socket lookup finds the TCP_NEW_SYN_RECV socket instead of the
listener, the --transparent option tries to match on the no_srccheck flag
of the request socket.

Unfortunately, that flag was only set for IPv4 sockets in tcp_v4_init_req()
by copying the transparent flag of the listener socket. This effectively
causes '-m socket --transparent' not match on the ACK packet sent by the
client in a TCP handshake.

Based on the suggestion from Eric Dumazet, this change moves the code
initializing no_srccheck to tcp_conn_request(), rendering the above
scenario working again.

Fixes: a940700003 ("netfilter: xt_socket: prepare for TCP_NEW_SYN_RECV support")
Signed-off-by: Alex Badics <alex.badics@balabit.com>
Signed-off-by: KOVACS Krisztian <hidden@balabit.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2016-09-25 23:16:11 +02:00
..
2015-08-25 13:38:50 -07:00
2016-04-27 22:48:24 -04:00
2016-08-09 14:57:39 -07:00
2016-06-08 11:36:02 -07:00
2016-09-01 14:09:00 -07:00
2016-04-27 22:48:23 -04:00
2016-08-15 13:37:12 -07:00
2016-07-09 17:45:56 -04:00
2016-06-10 23:07:49 -07:00
2016-06-10 23:07:49 -07:00
2016-08-30 22:27:18 -07:00
2016-09-01 14:09:01 -07:00
2016-06-10 23:07:49 -07:00
2016-08-18 23:27:27 -07:00
2015-09-17 17:18:37 -07:00
2013-05-31 17:19:05 -07:00