-
Notifications
You must be signed in to change notification settings - Fork 869
SOCKS error handling improvement #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There's no way to tell whether the architecture has its stdint.h, as __UINT_FAST64_TYPE__ built in define didn't exist yet. Redefining the types would break the build, and chances are we're not on some exotic architecture where stdint would be missing, so let's assume it exists.
The buf gets copied to hostname and is present verbatim in logs looking like pure random garbage. Moreover you can't really strlen() it. This was likely some silly typo in inet_ntoa -> inet_ntop conversion for ipv6, since it used to be correct before.
This used to look pretty random :( Try to keep the last decimal digits of internal errors sensible for v5 error codes. For most cases we can't really do much better than using the value of one. One specific code paths where we can return something more useful is the authentication, where we not communicate the underlying error code or signal an ACL denial. As for v4, there's not really much space to be too smart as only the code of 91 is meaningful. Therefore we limit the last digit to zero and one now.
|
Thanks, accepted with minor changes. Lubomir Rintel пишет:
|
|
Accepted by cherry-pick'ing commits. |
And a couple of more commits that were needed for reasonable operation for me.