[Openvpn-devel,v2,4/4] Do not set pool netmask when nopool is set

Message ID 20191113100702.6863-4-tom.ty89@gmail.com
State New
Headers show
Series
  • [Openvpn-devel,v2,1/4] Avoid repeating code for tap and tun+subnet in server directive
Related show

Commit Message

Tom Yan Nov. 13, 2019, 10:07 a.m.
The setting probably just slipped out of the if-block over rewrites.
---
 src/openvpn/helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/src/openvpn/helper.c b/src/openvpn/helper.c
index 6e2f0891..a36bc63a 100644
--- a/src/openvpn/helper.c
+++ b/src/openvpn/helper.c
@@ -351,8 +351,8 @@  helper_client_server(struct options *o)
                 o->ifconfig_pool_start = o->server_network + ptp + 1;
                 o->ifconfig_pool_end = (o->server_network | ~o->server_netmask) - ptp;
                 ifconfig_pool_verify_range(M_USAGE, o->ifconfig_pool_start, o->ifconfig_pool_end);
+                o->ifconfig_pool_netmask = o->server_netmask;
             }
-            o->ifconfig_pool_netmask = o->server_netmask;
 
             push_option(o, print_opt_route_gateway(o->server_network + ptp, &o->gc), M_USAGE);
             if (dev == DEV_TYPE_TUN && !o->route_default_gateway)