Browse code

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 <frank@lichtenheld.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20240502095322.9433-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28601.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>

Frank Lichtenheld authored on 2024/05/02 18:53:22
Showing 2 changed files
... ...
@@ -454,7 +454,7 @@ helper_client_server(struct options *o)
454 454
      * if !nogw:
455 455
      *   push "route-gateway dhcp"
456 456
      */
457
-    else if (o->server_bridge_defined | o->server_bridge_proxy_dhcp)
457
+    else if (o->server_bridge_defined || o->server_bridge_proxy_dhcp)
458 458
     {
459 459
         if (o->client)
460 460
         {
... ...
@@ -3565,7 +3565,7 @@ do_option_warnings(struct context *c)
3565 3565
         msg(M_WARN, "WARNING: using --pull/--client and --ifconfig together is probably not what you want");
3566 3566
     }
3567 3567
 
3568
-    if (o->server_bridge_defined | o->server_bridge_proxy_dhcp)
3568
+    if (o->server_bridge_defined || o->server_bridge_proxy_dhcp)
3569 3569
     {
3570 3570
         msg(M_WARN, "NOTE: when bridging your 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 adapter was previously set to");
3571 3571
     }