OpenVPN: max-clients value has been enhanced

Message ID 20200808064555.30933-1-ummeegge@ipfire.org
State Superseded
Headers
Series OpenVPN: max-clients value has been enhanced |

Commit Message

ummeegge Aug. 8, 2020, 6:45 a.m. UTC
  The --max-client value has been enhanced from 255 clients to 1024 clients.
Error message gives now explanation if the maximum has been reached.

Patch has been triggered by https://community.ipfire.org/t/openvpn-max-vpn-clients-quantity-and-connections/2925 .

Signed-off-by: Erik Kapfer <ummeegge@ipfire.org>
---
 html/cgi-bin/ovpnmain.cgi | 2 +-
 langs/de/cgi-bin/de.pl    | 2 +-
 langs/en/cgi-bin/en.pl    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
  

Comments

Michael Tremer Aug. 10, 2020, 9:50 a.m. UTC | #1
Hello,

This patch looks good so far.

But could we also change the numbers in the other transactions? I think that should be fine even without knowledge of those languages.

Best,
-Michael

> On 8 Aug 2020, at 07:45, Erik Kapfer <ummeegge@ipfire.org> wrote:
> 
> The --max-client value has been enhanced from 255 clients to 1024 clients.
> Error message gives now explanation if the maximum has been reached.
> 
> Patch has been triggered by https://community.ipfire.org/t/openvpn-max-vpn-clients-quantity-and-connections/2925 .
> 
> Signed-off-by: Erik Kapfer <ummeegge@ipfire.org>
> ---
> html/cgi-bin/ovpnmain.cgi | 2 +-
> langs/de/cgi-bin/de.pl    | 2 +-
> langs/en/cgi-bin/en.pl    | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi
> index 457ebcf1f..e80ee23a7 100644
> --- a/html/cgi-bin/ovpnmain.cgi
> +++ b/html/cgi-bin/ovpnmain.cgi
> @@ -890,7 +890,7 @@ if ($cgiparams{'ACTION'} eq $Lang::tr{'save-adv-options'}) {
> 	undef $vpnsettings{'ROUTES_PUSH'};
> 	&write_routepushfile;
>     }
> -    if ((length($cgiparams{'MAX_CLIENTS'}) == 0) || (($cgiparams{'MAX_CLIENTS'}) < 1 ) || (($cgiparams{'MAX_CLIENTS'}) > 255 )) {
> +    if ((length($cgiparams{'MAX_CLIENTS'}) == 0) || (($cgiparams{'MAX_CLIENTS'}) < 1 ) || (($cgiparams{'MAX_CLIENTS'}) > 1024 )) {
>         $errormessage = $Lang::tr{'invalid input for max clients'};
>         goto ADV_ERROR;
>     }
> diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl
> index b01e75eb5..bcea33320 100644
> --- a/langs/de/cgi-bin/de.pl
> +++ b/langs/de/cgi-bin/de.pl
> @@ -1457,7 +1457,7 @@
> 'invalid input for keepalive 1:2' => 'Ungültige Eingabe für Keepalive (mindestens ein Verhältnis von 1:2)',
> 'invalid input for keepalive 2' => 'Ungültige Eingabe für Keepalive ping-restart',
> 'invalid input for local ip address' => 'Ungültige Eingabe für die lokale IP-Adresse',
> -'invalid input for max clients' => 'Ungültige Eingabe für Max Clients',
> +'invalid input for max clients' => 'Ungültige Eingabe für Max Clients. Das Maximum von 1024 Clients wurde überschritten',
> 'invalid input for mode' => 'Ungültige Eingabe des Modus',
> 'invalid input for name' => 'Ungültige Eingabe für vollen Namen des Benutzers oder des System Hostnamens',
> 'invalid input for oink code' => 'Ungültige Eingabe für Oink Code',
> diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl
> index 7e3bbec89..95ee46393 100644
> --- a/langs/en/cgi-bin/en.pl
> +++ b/langs/en/cgi-bin/en.pl
> @@ -1481,7 +1481,7 @@
> 'invalid input for keepalive 1:2' => 'Invalid input for Keepalive use at least a ratio of 1:2',
> 'invalid input for keepalive 2' => 'Invalid input for Keepalive ping-restart',
> 'invalid input for local ip address' => 'Invalid input for local IP address',
> -'invalid input for max clients' => 'Invalid input for Max Clients',
> +'invalid input for max clients' => 'Invalid input for Max Clients. The maximum of 1024 clients has been exceeded',
> 'invalid input for mode' => 'Invalid input for mode',
> 'invalid input for name' => 'Invalid input for user\'s full name or system hostname',
> 'invalid input for oink code' => 'Invalid input for Oink code',
> -- 
> 2.12.2
>
  
ummeegge Aug. 10, 2020, 1:49 p.m. UTC | #2
Hi Michael,

Am Montag, den 10.08.2020, 10:50 +0100 schrieb Michael Tremer:
> Hello,
> 
> This patch looks good so far.
> 
> But could we also change the numbers in the other transactions? I
> think that should be fine even without knowledge of those languages.
If you meant translations ;-) i can go into a translator for the rest
of our languages and try to deliver the rest. To sharpen the language
quality i would ask then may also in our community platform for some
corrections...

> 
> Best,
> -Michael


Best,

Erik


> 
> > On 8 Aug 2020, at 07:45, Erik Kapfer <ummeegge@ipfire.org> wrote:
> > 
> > The --max-client value has been enhanced from 255 clients to 1024
> > clients.
> > Error message gives now explanation if the maximum has been
> > reached.
> > 
> > Patch has been triggered by 
> > https://community.ipfire.org/t/openvpn-max-vpn-clients-quantity-and-connections/2925
> >  .
> > 
> > Signed-off-by: Erik Kapfer <ummeegge@ipfire.org>
> > ---
> > html/cgi-bin/ovpnmain.cgi | 2 +-
> > langs/de/cgi-bin/de.pl    | 2 +-
> > langs/en/cgi-bin/en.pl    | 2 +-
> > 3 files changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi
> > index 457ebcf1f..e80ee23a7 100644
> > --- a/html/cgi-bin/ovpnmain.cgi
> > +++ b/html/cgi-bin/ovpnmain.cgi
> > @@ -890,7 +890,7 @@ if ($cgiparams{'ACTION'} eq $Lang::tr{'save-
> > adv-options'}) {
> > 	undef $vpnsettings{'ROUTES_PUSH'};
> > 	&write_routepushfile;
> >     }
> > -    if ((length($cgiparams{'MAX_CLIENTS'}) == 0) ||
> > (($cgiparams{'MAX_CLIENTS'}) < 1 ) || (($cgiparams{'MAX_CLIENTS'})
> > > 255 )) {
> > +    if ((length($cgiparams{'MAX_CLIENTS'}) == 0) ||
> > (($cgiparams{'MAX_CLIENTS'}) < 1 ) || (($cgiparams{'MAX_CLIENTS'})
> > > 1024 )) {
> >         $errormessage = $Lang::tr{'invalid input for max clients'};
> >         goto ADV_ERROR;
> >     }
> > diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl
> > index b01e75eb5..bcea33320 100644
> > --- a/langs/de/cgi-bin/de.pl
> > +++ b/langs/de/cgi-bin/de.pl
> > @@ -1457,7 +1457,7 @@
> > 'invalid input for keepalive 1:2' => 'Ungültige Eingabe für
> > Keepalive (mindestens ein Verhältnis von 1:2)',
> > 'invalid input for keepalive 2' => 'Ungültige Eingabe für Keepalive
> > ping-restart',
> > 'invalid input for local ip address' => 'Ungültige Eingabe für die
> > lokale IP-Adresse',
> > -'invalid input for max clients' => 'Ungültige Eingabe für Max
> > Clients',
> > +'invalid input for max clients' => 'Ungültige Eingabe für Max
> > Clients. Das Maximum von 1024 Clients wurde überschritten',
> > 'invalid input for mode' => 'Ungültige Eingabe des Modus',
> > 'invalid input for name' => 'Ungültige Eingabe für vollen Namen des
> > Benutzers oder des System Hostnamens',
> > 'invalid input for oink code' => 'Ungültige Eingabe für Oink Code',
> > diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl
> > index 7e3bbec89..95ee46393 100644
> > --- a/langs/en/cgi-bin/en.pl
> > +++ b/langs/en/cgi-bin/en.pl
> > @@ -1481,7 +1481,7 @@
> > 'invalid input for keepalive 1:2' => 'Invalid input for Keepalive
> > use at least a ratio of 1:2',
> > 'invalid input for keepalive 2' => 'Invalid input for Keepalive
> > ping-restart',
> > 'invalid input for local ip address' => 'Invalid input for local IP
> > address',
> > -'invalid input for max clients' => 'Invalid input for Max
> > Clients',
> > +'invalid input for max clients' => 'Invalid input for Max Clients.
> > The maximum of 1024 clients has been exceeded',
> > 'invalid input for mode' => 'Invalid input for mode',
> > 'invalid input for name' => 'Invalid input for user\'s full name or
> > system hostname',
> > 'invalid input for oink code' => 'Invalid input for Oink code',
> > -- 
> > 2.12.2
> > 
> 
>
  
Michael Tremer Aug. 10, 2020, 1:56 p.m. UTC | #3
Hi,

> On 10 Aug 2020, at 14:49, ummeegge <ummeegge@ipfire.org> wrote:
> 
> Hi Michael,
> 
> Am Montag, den 10.08.2020, 10:50 +0100 schrieb Michael Tremer:
>> Hello,
>> 
>> This patch looks good so far.
>> 
>> But could we also change the numbers in the other transactions? I
>> think that should be fine even without knowledge of those languages.
> If you meant translations ;-)

Yes, sometimes auto-correct makes me sound very stupid.

> i can go into a translator for the rest
> of our languages and try to deliver the rest. To sharpen the language
> quality i would ask then may also in our community platform for some
> corrections...

Changing the number should work. Not sure about all of them, but at least the get the right number even though it might be grammatically incorrect.

-Michael

> 
>> 
>> Best,
>> -Michael
> 
> 
> Best,
> 
> Erik
> 
> 
>> 
>>> On 8 Aug 2020, at 07:45, Erik Kapfer <ummeegge@ipfire.org> wrote:
>>> 
>>> The --max-client value has been enhanced from 255 clients to 1024
>>> clients.
>>> Error message gives now explanation if the maximum has been
>>> reached.
>>> 
>>> Patch has been triggered by 
>>> https://community.ipfire.org/t/openvpn-max-vpn-clients-quantity-and-connections/2925
>>> .
>>> 
>>> Signed-off-by: Erik Kapfer <ummeegge@ipfire.org>
>>> ---
>>> html/cgi-bin/ovpnmain.cgi | 2 +-
>>> langs/de/cgi-bin/de.pl    | 2 +-
>>> langs/en/cgi-bin/en.pl    | 2 +-
>>> 3 files changed, 3 insertions(+), 3 deletions(-)
>>> 
>>> diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi
>>> index 457ebcf1f..e80ee23a7 100644
>>> --- a/html/cgi-bin/ovpnmain.cgi
>>> +++ b/html/cgi-bin/ovpnmain.cgi
>>> @@ -890,7 +890,7 @@ if ($cgiparams{'ACTION'} eq $Lang::tr{'save-
>>> adv-options'}) {
>>> 	undef $vpnsettings{'ROUTES_PUSH'};
>>> 	&write_routepushfile;
>>>    }
>>> -    if ((length($cgiparams{'MAX_CLIENTS'}) == 0) ||
>>> (($cgiparams{'MAX_CLIENTS'}) < 1 ) || (($cgiparams{'MAX_CLIENTS'})
>>>> 255 )) {
>>> +    if ((length($cgiparams{'MAX_CLIENTS'}) == 0) ||
>>> (($cgiparams{'MAX_CLIENTS'}) < 1 ) || (($cgiparams{'MAX_CLIENTS'})
>>>> 1024 )) {
>>>        $errormessage = $Lang::tr{'invalid input for max clients'};
>>>        goto ADV_ERROR;
>>>    }
>>> diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl
>>> index b01e75eb5..bcea33320 100644
>>> --- a/langs/de/cgi-bin/de.pl
>>> +++ b/langs/de/cgi-bin/de.pl
>>> @@ -1457,7 +1457,7 @@
>>> 'invalid input for keepalive 1:2' => 'Ungültige Eingabe für
>>> Keepalive (mindestens ein Verhältnis von 1:2)',
>>> 'invalid input for keepalive 2' => 'Ungültige Eingabe für Keepalive
>>> ping-restart',
>>> 'invalid input for local ip address' => 'Ungültige Eingabe für die
>>> lokale IP-Adresse',
>>> -'invalid input for max clients' => 'Ungültige Eingabe für Max
>>> Clients',
>>> +'invalid input for max clients' => 'Ungültige Eingabe für Max
>>> Clients. Das Maximum von 1024 Clients wurde überschritten',
>>> 'invalid input for mode' => 'Ungültige Eingabe des Modus',
>>> 'invalid input for name' => 'Ungültige Eingabe für vollen Namen des
>>> Benutzers oder des System Hostnamens',
>>> 'invalid input for oink code' => 'Ungültige Eingabe für Oink Code',
>>> diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl
>>> index 7e3bbec89..95ee46393 100644
>>> --- a/langs/en/cgi-bin/en.pl
>>> +++ b/langs/en/cgi-bin/en.pl
>>> @@ -1481,7 +1481,7 @@
>>> 'invalid input for keepalive 1:2' => 'Invalid input for Keepalive
>>> use at least a ratio of 1:2',
>>> 'invalid input for keepalive 2' => 'Invalid input for Keepalive
>>> ping-restart',
>>> 'invalid input for local ip address' => 'Invalid input for local IP
>>> address',
>>> -'invalid input for max clients' => 'Invalid input for Max
>>> Clients',
>>> +'invalid input for max clients' => 'Invalid input for Max Clients.
>>> The maximum of 1024 clients has been exceeded',
>>> 'invalid input for mode' => 'Invalid input for mode',
>>> 'invalid input for name' => 'Invalid input for user\'s full name or
>>> system hostname',
>>> 'invalid input for oink code' => 'Invalid input for Oink code',
>>> -- 
>>> 2.12.2
>>> 
>> 
>> 
>
  

Patch

diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi
index 457ebcf1f..e80ee23a7 100644
--- a/html/cgi-bin/ovpnmain.cgi
+++ b/html/cgi-bin/ovpnmain.cgi
@@ -890,7 +890,7 @@  if ($cgiparams{'ACTION'} eq $Lang::tr{'save-adv-options'}) {
 	undef $vpnsettings{'ROUTES_PUSH'};
 	&write_routepushfile;
     }
-    if ((length($cgiparams{'MAX_CLIENTS'}) == 0) || (($cgiparams{'MAX_CLIENTS'}) < 1 ) || (($cgiparams{'MAX_CLIENTS'}) > 255 )) {
+    if ((length($cgiparams{'MAX_CLIENTS'}) == 0) || (($cgiparams{'MAX_CLIENTS'}) < 1 ) || (($cgiparams{'MAX_CLIENTS'}) > 1024 )) {
         $errormessage = $Lang::tr{'invalid input for max clients'};
         goto ADV_ERROR;
     }
diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl
index b01e75eb5..bcea33320 100644
--- a/langs/de/cgi-bin/de.pl
+++ b/langs/de/cgi-bin/de.pl
@@ -1457,7 +1457,7 @@ 
 'invalid input for keepalive 1:2' => 'Ungültige Eingabe für Keepalive (mindestens ein Verhältnis von 1:2)',
 'invalid input for keepalive 2' => 'Ungültige Eingabe für Keepalive ping-restart',
 'invalid input for local ip address' => 'Ungültige Eingabe für die lokale IP-Adresse',
-'invalid input for max clients' => 'Ungültige Eingabe für Max Clients',
+'invalid input for max clients' => 'Ungültige Eingabe für Max Clients. Das Maximum von 1024 Clients wurde überschritten',
 'invalid input for mode' => 'Ungültige Eingabe des Modus',
 'invalid input for name' => 'Ungültige Eingabe für vollen Namen des Benutzers oder des System Hostnamens',
 'invalid input for oink code' => 'Ungültige Eingabe für Oink Code',
diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl
index 7e3bbec89..95ee46393 100644
--- a/langs/en/cgi-bin/en.pl
+++ b/langs/en/cgi-bin/en.pl
@@ -1481,7 +1481,7 @@ 
 'invalid input for keepalive 1:2' => 'Invalid input for Keepalive use at least a ratio of 1:2',
 'invalid input for keepalive 2' => 'Invalid input for Keepalive ping-restart',
 'invalid input for local ip address' => 'Invalid input for local IP address',
-'invalid input for max clients' => 'Invalid input for Max Clients',
+'invalid input for max clients' => 'Invalid input for Max Clients. The maximum of 1024 clients has been exceeded',
 'invalid input for mode' => 'Invalid input for mode',
 'invalid input for name' => 'Invalid input for user\'s full name or system hostname',
 'invalid input for oink code' => 'Invalid input for Oink code',