]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: improve address sanity check in tipc_connect()
authorJon Maloy <jon.maloy@ericsson.com>
Fri, 13 Oct 2017 09:04:18 +0000 (11:04 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Oct 2017 15:46:00 +0000 (08:46 -0700)
commit5fceb7430540a37b97855d53b189a3791716858d
tree8007516156e1d53a479d6604aa6d963df62969a7
parent1283b46ef434ba12ac91b4210cd2a2691181c3f2
tipc: improve address sanity check in tipc_connect()

The address given to tipc_connect() is not completely sanity checked,
under the assumption that this will be done later in the function
__tipc_sendmsg() when the address is used there.

However, the latter functon will in the next commits serve as caller
to several other send functions, so we want to move the corresponding
sanity check there to the beginning of that function, before we possibly
need to grab the address stored by tipc_connect(). We must therefore
be able to trust that this address already has been thoroughly checked.

We do this in this commit.

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