]> git.baikalelectronics.ru Git - kernel.git/commit
rxrpc: call udp_tunnel_encap_enable in rxrpc_open_socket
authorXin Long <lucien.xin@gmail.com>
Wed, 3 Feb 2021 08:54:23 +0000 (16:54 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 5 Feb 2021 02:37:15 +0000 (18:37 -0800)
commit97b024fdd65ff45c9f1f9bef5d237581a570aec4
treeddea15539e696d53fc418d3d115b662d29d1cd0f
parent088b5d6871e0184c2a265c67863dbf6367423d2f
rxrpc: call udp_tunnel_encap_enable in rxrpc_open_socket

When doing encap_enable/increasing encap_needed_key, up->encap_enabled
is not set in rxrpc_open_socket(), and it will cause encap_needed_key
not being decreased in udpv6_destroy_sock().

This patch is to improve it by just calling udp_tunnel_encap_enable()
where it increases both UDP and UDPv6 encap_needed_key and sets
up->encap_enabled.

v4->v5:
  - add the missing '#include <net/udp_tunnel.h>', as David Howells
    noticed.

Acked-and-tested-by: David Howells <dhowells@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/rxrpc/local_object.c