]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
OpenVPN: Fix max-clients option
authorErik Kapfer <ummeegge@ipfire.org>
Mon, 4 Nov 2019 14:52:26 +0000 (15:52 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Wed, 13 Nov 2019 18:55:15 +0000 (18:55 +0000)
Fix: Triggered by https://forum.ipfire.org/viewtopic.php?f=16&t=23551

Since the 'DHCP_WINS' cgiparam has been set for the max-client directive, changes in the WUI has not been adapted to server.conf.

Signed-off-by: Erik Kapfer <ummeegge@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
html/cgi-bin/ovpnmain.cgi

index 970444a55cc050b2435aa09f841016486096016b..09f0dc42f7c3e6f24cd786f5123ff500ebeade65 100644 (file)
@@ -355,10 +355,10 @@ sub writeserverconf {
         print CONF "push \"dhcp-option WINS $sovpnsettings{DHCP_WINS}\"\n";
     }
     
-    if ($sovpnsettings{DHCP_WINS} eq '') {
+    if ($sovpnsettings{MAX_CLIENTS} eq '') {
        print CONF "max-clients 100\n";
     }
-    if ($sovpnsettings{DHCP_WINS} ne '') {
+    if ($sovpnsettings{MAX_CLIENTS} ne '') {
        print CONF "max-clients $sovpnsettings{MAX_CLIENTS}\n";
     }  
     print CONF "tls-verify /usr/lib/openvpn/verify\n";