Skip to content

Commit

Permalink
rxrpc: Map the EACCES error produced by some ICMP6 to EHOSTUNREACH
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Howells committed May 31, 2020
1 parent 3f19b2a commit 23e2db3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/rxrpc/peer_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 23e2db3

Please sign in to comment.