[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #14135 [Pluggable transport]: Incorrect SocksListener temporary error check
#14135: Incorrect SocksListener temporary error check
-------------------------------------+--------------------------
Reporter: adam-p | Owner: dcf
Type: defect | Status: needs_review
Priority: minor | Milestone:
Component: Pluggable transport | Version:
Resolution: | Keywords: goptlib
Actual Points: | Parent ID:
Points: |
-------------------------------------+--------------------------
Changes (by yawning):
* keywords: => goptlib
* status: new => needs_review
* component: meek => Pluggable transport
Comment:
Since I was looking over the SOCKS code again in relation to #12535, I
went and wrote something that also implements "second thing".
Similar approach taken to adam-p's branch, all errors in
`SocksListener.AcceptSocks()` past the `ln.Listener.Accept()` call are
returned as a `net.Error` that has a `Temporary()` that always returns
`true`.
Either version of the check will continue to work, since
`ln.Listener.Accept()`'s errors are returned untouched, and if non-
temporary, will cause the loop to terminate, as they should. All other
net.Errors will be re-wrapped since they are net.Errors generated from the
new client connection, and have absolutely nothing to do with the
listener.
A defer in `SocksListener.AcceptSocks()` used since it's cleaner to do it
that way, saving the need to splatter the wrapper all over the rest of the
socks code.
https://github.com/Yawning/goptlib/commit/e43b7d4ae09aaf10f0d544cf86da62bf1de3d74b
Note: My change depends on my #12535 branch, since modifying the SOCKS4a
code is for people that are living in the past.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/14135#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs