Am 03.12.21 um 17:18 schrieb Frank Lichtenheld:
Arne Schwabe <[email protected]> hat am 02.12.2021 13:54 geschrieben:
- if (ce->proto == PROTO_TCP_CLIENT && !ce->local
-        && !ce->local_port_defined && !ce->bind_defined)
-    {
-        ce->bind_local = false;
-    }
- if (ce->proto == PROTO_UDP && ce->socks_proxy_server && !ce->local
-        && !ce->local_port_defined && !ce->bind_defined)
+    bool need_bind = ce->local || ce->local_port_defined || ce->bind_defined;
+    bool uses_socks = ce->proto == PROTO_UDP && ce->socks_proxy_server;
+
+    if (!need_bind && (ce->proto == PROTO_TCP_CLIENT || uses_socks || o->pull))
      {
          ce->bind_local = false;
      }

The refactoring makes it very hard to see what the actual change is. Maybe it 
would be better to split this in two commits?

The only actual change in behavior is the "|| o->pull", right?


Yes. But should I really split up this 5 line patch into two patches? That feels a bit excessive.

Arne


_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to