Re: [PATCH net-next v20 12/25] ovpn: implement TCP transport

2025-03-03 Thread Antonio Quartulli
On 03/03/2025 16:08, Sabrina Dubroca wrote: 2025-02-27, 02:21:37 +0100, Antonio Quartulli wrote: @@ -94,11 +96,23 @@ void ovpn_socket_release(struct ovpn_peer *peer) * detached before it can be picked by a concurrent reader. */ lock_sock(sock->sock->sk); - ovpn_so

Re: [PATCH net-next v20 12/25] ovpn: implement TCP transport

2025-03-03 Thread Sabrina Dubroca
2025-02-27, 02:21:37 +0100, Antonio Quartulli wrote: > @@ -94,11 +96,23 @@ void ovpn_socket_release(struct ovpn_peer *peer) >* detached before it can be picked by a concurrent reader. >*/ > lock_sock(sock->sock->sk); > - ovpn_socket_put(peer, sock); > + released = ovpn

Re: [PATCH net-next v20 12/25] ovpn: implement TCP transport

2025-03-02 Thread Antonio Quartulli
On 02/03/2025 19:59, Sabrina Dubroca wrote: 2025-02-27, 02:21:37 +0100, Antonio Quartulli wrote: Moreover export tcp_release_cb by means of EXPORT_SYMBOL instead of EXPORT_IPV6_MOD, so that other modules can use it, even if IPV6 is not compiled in. Is that really needed? You're saving tcp.sk_c

Re: [PATCH net-next v20 12/25] ovpn: implement TCP transport

2025-03-02 Thread Sabrina Dubroca
2025-02-27, 02:21:37 +0100, Antonio Quartulli wrote: > Moreover export tcp_release_cb by means of EXPORT_SYMBOL instead of > EXPORT_IPV6_MOD, so that other modules can use it, even if IPV6 is > not compiled in. Is that really needed? You're saving tcp.sk_cb.prot, so you could just call peer->tcp.s

[PATCH net-next v20 12/25] ovpn: implement TCP transport

2025-02-26 Thread Antonio Quartulli
With this change ovpn is allowed to communicate to peers also via TCP. Parsing of incoming messages is implemented through the strparser API. Note that ovpn redefines sk_prot and sk_socket->ops for the TCP socket used to communicate with the peer. For this reason it needs to access inet6_stream_op