]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: check addr_size with sa_family_t size in __sctp_setsockopt_connectx
authorXin Long <lucien.xin@gmail.com>
Tue, 30 Jul 2019 12:38:20 +0000 (20:38 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 Jul 2019 21:18:14 +0000 (14:18 -0700)
commit23a36dc1600889db64b1726b8007122a4fd4adfe
tree1fc1e6723a62d40201a928691749e89b15966a8e
parent376c966aa7751f8fb182d1fc64135ea6042898d4
sctp: check addr_size with sa_family_t size in __sctp_setsockopt_connectx

Now __sctp_connect() is called by __sctp_setsockopt_connectx() and
sctp_inet_connect(), the latter has done addr_size check with size
of sa_family_t.

In the next patch to clean up __sctp_connect(), we will remove
addr_size check with size of sa_family_t from __sctp_connect()
for the 1st address.

So before doing that, __sctp_setsockopt_connectx() should do
this check first, as sctp_inet_connect() does.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/socket.c