Am 05.12.2021 um 12:40 schrieb Gert Doering:
Hi,On Sun, Dec 05, 2021 at 12:16:56PM +0100, Frank Lichtenheld wrote:I need to think a bit more into "what conditions is this checking, exactly, and why?" - but with refactoring, I'd have to do that thinking twice :-)I disagree. If you had one patch that does refactoring but does not intend any functional change, and one patch that just adds "|| o->pull", the general understanding of each patch would require much less time and thinking.True, but the second patch would not be correct, then :-) - as it actually adds more conditions than just "o->pull". The original code does not check for socks.
The original code checks for socks. That is not changed. The orignal code basically has two ifs that checks for the code that is !bind_need and the particular condition (socks or tcp-client)
I am not exactly happy with the *new* code, as it is still too convoluted
for my coffee level ("if (!bind_needed && conditions) set bind_local=false",
what are these conditions? why?)
I can add more comments to the code. bind_needed is basically if the options have a condition that forces binding anyway.
but I do not think an intermediate patch will make these particular conditional contortions easier...
_______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
