From: "flichtenheld (Code Review)" Date: Wed, 10 Apr 2024 10:29:03 +0000 References: Reply-To: frank@...2641..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net Message-ID: <87ab2e32786be872f9341611ac3445ab0796a358-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="yCX/jdYqd0E="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: Fix "binary or" vs "boolean or" related to server_bridge_proxy_dhcp List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: openvpn-devel --yCX/jdYqd0E= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/553?usp=3Demail to review the following change. Change subject: Fix "binary or" vs "boolean or" related to server_bridge_pr= oxy_dhcp ...................................................................... Fix "binary or" vs "boolean or" related to server_bridge_proxy_dhcp Both values are boolean so there is no reason to use "|" and it just confuses the reader whether there is something more going on here. Change-Id: Ie61fa6a78875ecbaa9d3d8e7a50603d77c9ce09e Signed-off-by: Frank Lichtenheld --- M src/openvpn/helper.c M src/openvpn/init.c 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/53/553/1 diff --git a/src/openvpn/helper.c b/src/openvpn/helper.c index 1bab84c..24dee97 100644 --- a/src/openvpn/helper.c +++ b/src/openvpn/helper.c @@ -427,7 +427,7 @@ * if !nogw: * push "route-gateway dhcp" */ - else if (o->server_bridge_defined | o->server_bridge_proxy_dhcp) + else if (o->server_bridge_defined || o->server_bridge_proxy_dhcp) { if (o->client) { diff --git a/src/openvpn/init.c b/src/openvpn/init.c index 02205e7..e67f10e 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -3565,7 +3565,7 @@ msg(M_WARN, "WARNING: using --pull/--client and --ifconfig togethe= r is probably not what you want"); } - if (o->server_bridge_defined | o->server_bridge_proxy_dhcp) + if (o->server_bridge_defined || o->server_bridge_proxy_dhcp) { msg(M_WARN, "NOTE: when bridging your LAN adapter with the TAP ada= pter, note that the new bridge adapter will often take on its own IP addres= s that is different from what the LAN adapter was previously set to"); } -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/553?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ie61fa6a78875ecbaa9d3d8e7a50603d77c9ce09e Gerrit-Change-Number: 553 Gerrit-PatchSet: 1 Gerrit-Owner: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-MessageType: newchange --yCX/jdYqd0E= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: plaisthos.

flichtenheld would like plaisthos to review this change.

Vi= ew Change

Fix "binary or" vs "boolean or" related t=
o server_bridge_proxy_dhcp

Both values are boolean so there is no re= ason to use "|"
and it just confuses the reader whether there = is something
more going on here.

Change-Id: Ie61fa6a78875ecbaa9d3= d8e7a50603d77c9ce09e
Signed-off-by: Frank Lichtenheld <frank@...2724...= ..>
---
M src/openvpn/helper.c
M src/openvpn/init.c
2 files = changed, 2 insertions(+), 2 deletions(-)

git pull ssh://gerrit.op=
envpn.net:29418/openvpn refs/changes/53/553/1
diff --git a/src/open=
vpn/helper.c b/src/openvpn/helper.c
index 1bab84c..24dee97 = 100644
--- a/src/openvpn/helper.c
+++ b/src= /openvpn/helper.c
@@ -427,7 +427,7 @@
= * if !nogw:
* push "route-gateway dhcp"<= /span>
*/
+ else if (o-&g= t;server_bridge_defined || o->server_bridge_proxy_dhcp)
= {
if (o->client)
= {
diff --git a/src/openvpn/init.c b/src/openvpn/init.c
index 02205e7..e67f10e 100644
--- a/src/openvpn= /init.c
+++ b/src/openvpn/init.c
@@ -3565,7= +3565,7 @@
msg(M_WARN, "WARNING: using --pul= l/--client and --ifconfig together is probably not what you want");
}

- if (o->server_bridge_defined | o->server_bridge_= proxy_dhcp)
+ if (= o->server_bridge_defined || o->server_bridge_proxy_dhcp)
{

msg(M_WARN, "NOTE: when bridging y= our LAN adapter with the TAP adapter, note that the new bridge adapter will= often take on its own IP address that is different from what the LAN adapt= er was previously set to");
}

To view, visit change 553. To unsubscribe, or for help writing = mail filters, visit settings= .

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ie61fa6a78875ecbaa9d3d8e7a50= 603d77c9ce09e
Gerrit-Change-Number: 553
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-MessageType: newchange
--yCX/jdYqd0E=--