]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: add support for connect() on dgram/rdm sockets
authorErik Hugne <erik.hugne@ericsson.com>
Thu, 19 Mar 2015 08:02:19 +0000 (09:02 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 19 Mar 2015 16:25:54 +0000 (12:25 -0400)
commit5f94e5cf8c7f78c2566c4bd42bfbe6ad5f5cdf26
treeaebead12cc0faf722ad62b94826730754830dd1b
parent7c45385d84fd5c25649ffdba885471cce79fe047
tipc: add support for connect() on dgram/rdm sockets

Following the example of ip4_datagram_connect, we store the
address in the socket structure for dgram/rdm sockets and use
that as the default destination for subsequent send() calls.
It is allowed to connect to any address types, and the behaviour
of send() will be the same as a normal sendto() with this address
provided. Binding to an AF_UNSPEC address clears the association.

Signed-off-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/socket.c