[PATCH 5.12 138/296] sctp: add the missing setting for asoc encap_port

Greg Kroah-Hartman
2021-05-31T16:31:22Z

From: Xin Long <lucien.xin@gmail.com>

commit 297739bd73f6e49d80bac4bfd27f3598b798c0d4 upstream.

This patch is to add the missing setting back for asoc encap_port.

Fixes: 8dba29603b5c ("sctp: add SCTP_REMOTE_UDP_ENCAPS_PORT sockopt")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/sctp/socket.c | 1 +
1 file changed, 1 insertion(+)

--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -4473,6 +4473,7 @@ static int sctp_setsockopt_encap_port(st
transports)
t->encap_port = encap_port;

+ asoc->encap_port = encap_port;
return 0;
}