]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
rxrpc: Fix error reception on AF_INET6 sockets
authorDavid Howells <dhowells@redhat.com>
Thu, 10 May 2018 22:26:00 +0000 (23:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Jun 2018 19:01:40 +0000 (04:01 +0900)
commite41489e6e9f0a9e98461be11644f9b5a6706a4b0
treee35f720a1952e096dddebf89bb38f9a4ce28d68c
parent4a72e716693b9d8aa56ff51d96049ee7daed487d
rxrpc: Fix error reception on AF_INET6 sockets

[ Upstream commit f2aeed3a591ff29a82495eeaa92ac4780bad7487 ]

AF_RXRPC tries to turn on IP_RECVERR and IP_MTU_DISCOVER on the UDP socket
it just opened for communications with the outside world, regardless of the
type of socket.  Unfortunately, this doesn't work with an AF_INET6 socket.

Fix this by turning on IPV6_RECVERR and IPV6_MTU_DISCOVER instead if the
socket is of the AF_INET6 family.

Without this, kAFS server and address rotation doesn't work correctly
because the algorithm doesn't detect received network errors.

Fixes: 75b54cb57ca3 ("rxrpc: Add IPv6 support")
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/rxrpc/local_object.c