From: David Howells Date: Sat, 2 May 2020 12:31:19 +0000 (+0100) Subject: rxrpc: Map the EACCES error produced by some ICMP6 to EHOSTUNREACH X-Git-Tag: v5.8-rc1~123^2~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23e2db311a10ba66c439ddac7a703991309702ee;p=thirdparty%2Fkernel%2Flinux.git rxrpc: Map the EACCES error produced by some ICMP6 to EHOSTUNREACH Map the EACCES error that is produced by some ICMP6 packets to EHOSTUNREACH when we get them as EACCES has other meanings within a filesystem context. Signed-off-by: David Howells --- diff --git a/net/rxrpc/peer_event.c b/net/rxrpc/peer_event.c index b1449d9718836..112e490ebbcd9 100644 --- a/net/rxrpc/peer_event.c +++ b/net/rxrpc/peer_event.c @@ -271,6 +271,9 @@ static void rxrpc_store_error(struct rxrpc_peer *peer, break; case SO_EE_ORIGIN_ICMP6: + if (err == EACCES) + err = EHOSTUNREACH; + /* Fall through */ default: _proto("Rx Received error report { orig=%u }", ee->ee_origin); break;