]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: rds: Use address family to designate IPv4 or IPv6 addresses
authorHåkon Bugge <Haakon.Bugge@oracle.com>
Fri, 28 Sep 2018 13:23:13 +0000 (15:23 +0200)
committerJack Vogel <jack.vogel@oracle.com>
Sat, 29 Sep 2018 23:44:37 +0000 (16:44 -0700)
commit60ca15120a6679e75f1b1ccc2e47cc3285c076f8
tree450396d751e913d09fdfce8c94862a1ff6afe9dc
parent738eb5910976ebd6ee16ab772dd8a1cf62a163fc
net: rds: Use address family to designate IPv4 or IPv6 addresses

The condition to interpret the supplied address in
rds_cancel_sent_to() was the length of the supplied user-data. We need
to tighten the API here to the extent possible, subject to SKGXP
passing in sizeof(struct sockaddr_storage) as the optlen, independent
of the actual address size.

We will 1) make sure the data passed in to the kernel is "big enough",
2) that the address is either AF_INET or AF_INET6, and 3) that the
bound address is ipv6_addr_v4mapped() in the AF_INET case and not in
the AF_INET6 case.

Orabug: 28720071

Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
net/rds/af_rds.c