aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sctp/sctp.h
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2018-11-12 18:27:16 +0800
committerDavid S. Miller <davem@davemloft.net>2018-11-12 09:09:51 -0800
commit76c6d988aeb3c15d57ea0c245a3b5f27802c1fbe (patch)
tree5508ea6085cda96f528f98229a2317536b776bad /include/net/sctp/sctp.h
parentsctp: do reuseport_select_sock in __sctp_rcv_lookup_endpoint (diff)
downloadlinux-dev-76c6d988aeb3c15d57ea0c245a3b5f27802c1fbe.tar.xz
linux-dev-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 'include/net/sctp/sctp.h')
-rw-r--r--include/net/sctp/sctp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 9a3b48a35e90..cdf2e80abc44 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -152,7 +152,7 @@ int sctp_primitive_RECONF(struct net *net, struct sctp_association *asoc,
*/
int sctp_rcv(struct sk_buff *skb);
int sctp_v4_err(struct sk_buff *skb, u32 info);
-void sctp_hash_endpoint(struct sctp_endpoint *);
+int sctp_hash_endpoint(struct sctp_endpoint *ep);
void sctp_unhash_endpoint(struct sctp_endpoint *);
struct sock *sctp_err_lookup(struct net *net, int family, struct sk_buff *,
struct sctphdr *, struct sctp_association **,