]> git.ipfire.org Git - thirdparty/linux.git/commit
ovpn: properly deconfigure UDP-tunnel
authorAntonio Quartulli <antonio@openvpn.net>
Tue, 13 May 2025 14:43:59 +0000 (16:43 +0200)
committerAntonio Quartulli <antonio@openvpn.net>
Tue, 3 Jun 2025 11:08:14 +0000 (13:08 +0200)
commit930faf1eb8d70226ac804b61e5cd79b17fb3261d
treedd6a96c5290faecc3a9126073197dbaf2a097115
parent408da3a0f89d581421ca9bd6ff39c7dd05bc4b2f
ovpn: properly deconfigure UDP-tunnel

When deconfiguring a UDP-tunnel from a socket, we cannot
call setup_udp_tunnel_sock() with an empty config, because
this helper is expected to be invoked only during setup.

Get rid of the call to setup_udp_tunnel_sock() and just
revert what it did during socket initialization..

Note that the global udp_encap_needed_key and the GRO state
are left untouched: udp_destroy_socket() will eventually
take care of them.

Cc: Sabrina Dubroca <sd@queasysnail.net>
Cc: Oleksandr Natalenko <oleksandr@natalenko.name>
Fixes: ab66abbc769b ("ovpn: implement basic RX path (UDP)")
Reported-by: Paolo Abeni <pabeni@redhat.com>
Closes: https://lore.kernel.org/netdev/1a47ce02-fd42-4761-8697-f3f315011cc6@redhat.com
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
drivers/net/ovpn/udp.c