As discussed in my previous post, the autobind_lsp performs hard binding. This will cause issues for LSPs that need to connect to localhost.
About hard binding:
Hard binding is a per socket TCP options specified by: WSAIoctl(..., SIO_UCAST_IF,..).
Once a socket is hard bound, all data on that socket must be sent/received from the same adapter. In hard binding, the loop back adapter is a distinct adapter.
When does hard binding cause a problem?
Hard binding causes a problem when you want your LSP to connect to local host after a hard bind has occurred. In this case, you do not want the hard binding to occur.
Example of common failure:
step 1) App: connect (10.10.10.10) step 2) autobind_lsp: bind (10.10.10.10) step 3) autobind_lsp: WSAIoctl(…, SIO_UCAST_IF, …) step 4) autobind_lsp: connect (10.10.10.10) step 5) YourProxy_LSP: connect_to_your_proxy_server (127.0.0.1:1080)
step 5) Will fail since your socket is already hard bound to adapter 10.10.10.10.
The work around:
A work around is to layer your LSP under autobind, and not propagate the SIO_UCAST_IF IOCTLs to the next LSP in the stack.
When you should use the work around:
This work around should only be used for sockets on which your LSP is explicitly proxying all data to a component you control. If your LSP is not doing this, the workaround should not be used.