]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
commit23998835be98a6842e5698fa1824f404c7de850d
tree8007516156e1d53a479d6604aa6d963df62969a7
parent14c04493cb77bc38404dbcb39d5ccbb667831ad7
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