Message-ID: Date: Sun, 5 Dec 2021 03:57:55 +0100 MIME-Version: 1.0 Content-Language: en-GB References: <20211202125455.2593763-1-arne@...1227...> <2116536034.296245.1638548339523@...2642...> From: Arne Schwabe In-Reply-To: <2116536034.296245.1638548339523@...2642...> Subject: Re: [Openvpn-devel] [PATCH] Make --nobind default for --pull List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit To: Frank Lichtenheld , openvpn-devel@lists.sourceforge.net Am 03.12.21 um 17:18 schrieb Frank Lichtenheld: >> Arne Schwabe 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