Skip to content

Commit

Permalink
Fix filtered exceptions when checking for ip forwarding
Browse files Browse the repository at this point in the history
  • Loading branch information
rzikm authored and github-actions committed Jan 25, 2023
1 parent 7db1c33 commit 9b70d1f
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ private bool GetIsForwardingEnabled()
{
return StringParsingHelpers.ParseRawIntFile(paths[i]) == 1;
}
catch (IOException) { }
catch (UnauthorizedAccessException) { }
catch (NetworkInformationException ex) when (ex.InnerException is IOException or UnauthorizedAccessException) { }
}

return false;
Expand Down

0 comments on commit 9b70d1f

Please sign in to comment.