diff options
author | Xin Long <lucien.xin@gmail.com> | 2018-11-12 11:27:16 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-12 18:09:51 +0100 |
commit | 76c6d988aeb3c15d57ea0c245a3b5f27802c1fbe (patch) | |
tree | 5508ea6085cda96f528f98229a2317536b776bad /net/sctp/socket.c | |
parent | sctp: do reuseport_select_sock in __sctp_rcv_lookup_endpoint (diff) | |
download | linux-76c6d988aeb3c15d57ea0c245a3b5f27802c1fbe.tar.xz linux-76c6d988aeb3c15d57ea0c245a3b5f27802c1fbe.zip |
sctp: add sock_reuseport for the sock in __sctp_hash_endpoint
This is a part of sk_reuseport support for sctp. It defines a helper
sctp_bind_addrs_check() to check if the bind_addrs in two socks are
matched. It will add sock_reuseport if they are completely matched,
and return err if they are partly matched, and alloc sock_reuseport
if all socks are not matched at all.
It will work until sk_reuseport support is added in
sctp_get_port_local() in the next patch.
v1->v2:
- use 'laddr->valid && laddr2->valid' check instead as Marcelo
pointed in sctp_bind_addrs_check().
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | net/sctp/socket.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 739f3e50120d..2e955f1dbe3f 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -7852,8 +7852,7 @@ static int sctp_listen_start(struct sock *sk, int backlog) } sk->sk_max_ack_backlog = backlog; - sctp_hash_endpoint(ep); - return 0; + return sctp_hash_endpoint(ep); } /* |