summaryrefslogtreecommitdiff
path: root/net/rxrpc
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2020-05-02 13:31:19 +0100
committerDavid Howells <dhowells@redhat.com>2020-05-31 15:19:51 +0100
commit23e2db311a10ba66c439ddac7a703991309702ee (patch)
tree399a8a64936e0abdd96f10943bb2cc3a76a030c0 /net/rxrpc
parent3f19b2ab97a97b413c24b66c67ae16daa4f56c35 (diff)
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 <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc')
-rw-r--r--net/rxrpc/peer_event.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/rxrpc/peer_event.c b/net/rxrpc/peer_event.c
index b1449d971883..112e490ebbcd 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;