net: add a new bind_add method
The SCTP protocol allows to bind multiple address to a socket. That feature is currently only exposed as a socket option. Add a bind_add method struct proto that allows to bind additional addresses, and switch the dlm code to use the method instead of going through the socket option from kernel space. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
05bfd36614
commit
c0425a4249
@@ -3712,3 +3712,11 @@ bool sk_busy_loop_end(void *p, unsigned long start_time)
|
||||
}
|
||||
EXPORT_SYMBOL(sk_busy_loop_end);
|
||||
#endif /* CONFIG_NET_RX_BUSY_POLL */
|
||||
|
||||
int sock_bind_add(struct sock *sk, struct sockaddr *addr, int addr_len)
|
||||
{
|
||||
if (!sk->sk_prot->bind_add)
|
||||
return -EOPNOTSUPP;
|
||||
return sk->sk_prot->bind_add(sk, addr, addr_len);
|
||||
}
|
||||
EXPORT_SYMBOL(sock_bind_add);
|
||||
|
Reference in New Issue
Block a user