]> git.baikalelectronics.ru Git - kernel.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)
committerDavid Howells <dhowells@redhat.com>
Thu, 10 May 2018 22:26:00 +0000 (23:26 +0100)
commit66d77cc5e92ab97dfb3808057484ecf22283bcd0
treec92adff145aee3ca0a9b29400171eedb6f98210d
parentd43177ff5420b94f67eba2dc20fad75d9cdc5575
rxrpc: Fix error reception on AF_INET6 sockets

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: f1721f4f1c81 ("rxrpc: Add IPv6 support")
Signed-off-by: David Howells <dhowells@redhat.com>
net/rxrpc/local_object.c