[Openvpn-devel] Removed error message for an option flag not supported with --server-ipv6

Message ID 20211229102924.8901-1-gert@greenie.muc.de
State Accepted
Headers show
Series [Openvpn-devel] Removed error message for an option flag not supported with --server-ipv6 | expand

Commit Message

Gert Doering Dec. 29, 2021, 10:29 a.m. UTC
From: Camille Guérin <guerincamille56@gmail.com>

Signed-off-by: Camille Guerin <guerincamille56@gmail.com>

Closes: OpenVPN/openvpn#164
---
 src/openvpn/options.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

Comments

Frank Lichtenheld Jan. 10, 2022, 9:37 a.m. UTC | #1
Looks good to me.

Acked-by: Frank Lichtenheld <frank@lichtenheld.com>

> Gert Doering <gert@greenie.muc.de> hat am 29.12.2021 11:29 geschrieben:
> 
>  
> From: Camille Guérin <guerincamille56@gmail.com>
> 
> Signed-off-by: Camille Guerin <guerincamille56@gmail.com>
> 
> Closes: OpenVPN/openvpn#164
> ---
>  src/openvpn/options.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/src/openvpn/options.c b/src/openvpn/options.c
> index ac13412a..f59d89cb 100644
> --- a/src/openvpn/options.c
> +++ b/src/openvpn/options.c
> @@ -6870,7 +6870,7 @@ add_option(struct options *options,
>              }
>          }
>      }
> -    else if (streq(p[0], "server-ipv6") && p[1] && !p[3])
> +    else if (streq(p[0], "server-ipv6") && p[1] && !p[2])
>      {
>          const int lev = M_WARN;
>          struct in6_addr network;
> @@ -6893,12 +6893,6 @@ add_option(struct options *options,
>          options->server_ipv6_defined = true;
>          options->server_network_ipv6 = network;
>          options->server_netbits_ipv6 = netbits;
> -
> -        if (p[2])       /* no "nopool" options or similar for IPv6 */
> -        {
> -            msg(msglevel, "error parsing --server-ipv6: %s is not a recognized flag", p[3]);
> -            goto err;
> -        }
>      }
>      else if (streq(p[0], "server-bridge") && p[1] && p[2] && p[3] && p[4] && !p[5])
>      {
> -- 
> 2.26.3
> 
> 
> 
> _______________________________________________
> Openvpn-devel mailing list
> Openvpn-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openvpn-devel

--
Frank Lichtenheld
Gert Doering Jan. 10, 2022, 2:59 p.m. UTC | #2
Your patch has been applied to the master branch.

commit c2c8128ad56e5ee1912166218ee36a2f0fe5b5c2
Author: Camille Guérin
Date:   Wed Dec 29 11:29:24 2021 +0100

     Removed error message for an option flag not supported with --server-ipv6

     Signed-off-by: Camille Guerin <guerincamille56@gmail.com>
     Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
     Message-Id: <20211229102924.8901-1-gert@greenie.muc.de>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg23471.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index ac13412a..f59d89cb 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -6870,7 +6870,7 @@  add_option(struct options *options,
             }
         }
     }
-    else if (streq(p[0], "server-ipv6") && p[1] && !p[3])
+    else if (streq(p[0], "server-ipv6") && p[1] && !p[2])
     {
         const int lev = M_WARN;
         struct in6_addr network;
@@ -6893,12 +6893,6 @@  add_option(struct options *options,
         options->server_ipv6_defined = true;
         options->server_network_ipv6 = network;
         options->server_netbits_ipv6 = netbits;
-
-        if (p[2])       /* no "nopool" options or similar for IPv6 */
-        {
-            msg(msglevel, "error parsing --server-ipv6: %s is not a recognized flag", p[3]);
-            goto err;
-        }
     }
     else if (streq(p[0], "server-bridge") && p[1] && p[2] && p[3] && p[4] && !p[5])
     {