]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
rxrpc: Permit multiple service binding
authorDavid Howells <dhowells@redhat.com>
Mon, 5 Jun 2017 13:30:49 +0000 (14:30 +0100)
committerDavid Howells <dhowells@redhat.com>
Mon, 5 Jun 2017 13:30:49 +0000 (14:30 +0100)
commit28036f44851e2515aa91b547b45cefddcac52ff6
treea129c98f3113b73140e4c81a159e2d9cc076a63f
parent68d6d1ae5c0429bcc8911e1db5f80fe2cd1ca974
rxrpc: Permit multiple service binding

Permit bind() to be called on an AF_RXRPC socket more than once (currently
maximum twice) to bind multiple listening services to it.  There are some
restrictions:

 (1) All bind() calls involved must have a non-zero service ID.

 (2) The service IDs must all be different.

 (3) The rest of the address (notably the transport part) must be the same
     in all (a single UDP socket is shared).

 (4) This must be done before listen() or sendmsg() is called.

This allows someone to connect to the service socket with different service
IDs and lays the foundation for service upgrading.

The service ID used by an incoming call can be extracted from the msg_name
returned by recvmsg().

Signed-off-by: David Howells <dhowells@redhat.com>
Documentation/networking/rxrpc.txt
net/rxrpc/af_rxrpc.c
net/rxrpc/ar-internal.h
net/rxrpc/call_accept.c
net/rxrpc/local_object.c
net/rxrpc/security.c