[Openvpn-devel] Add argument from openvpn2 to be ignored in openvpn3 client

Message ID CABJvA8nQoZbdjYrfMvR+bt5xPXOT4a-O3gkE99t0JWC2OjEyNQ@mail.gmail.com
State Accepted
Delegated to: David Sommerseth
Headers show
Series
  • [Openvpn-devel] Add argument from openvpn2 to be ignored in openvpn3 client
Related show

Commit Message

romain loutrel Feb. 13, 2021, 8:25 p.m.
Hi I created today the bug ticket:
https://github.com/OpenVPN/openvpn3-linux/issues/36

I have a patch to fix the problem (accept but ignore old parameters
from openvpn2 in openvpn3)

I hope I made everything correctly.

Thanks for your consideration

Comments

David Sommerseth Feb. 24, 2021, 9:09 p.m. | #1
On 13/02/2021 21:25, romain loutrel wrote:
> Hi I created today the bug ticket:
> https://github.com/OpenVPN/openvpn3-linux/issues/36
> 
> I have a patch to fix the problem (accept but ignore old parameters
> from openvpn2 in openvpn3)
> 
> I hope I made everything correctly.
> 
Thanks a lot for your patch.  It has been applied to git master and will
be part of the next release.


commit b1a270062e3d35dcf73f57340bd85fcb3d84b4cc
Author: Romain Loutrel <un.romain.loutrel@gmail.com>
Date:   Sat Feb 13 21:25:43 2021 +0100

     python: Add --mute, --route-delay and --route-method to ignored options
     
     These options are not used nor supported by OpenVPN 3 Core library nor
     OpenVPN 3 Linux.  The logging is handled very differently from
     OpenVPN 2.x, so the --mute option does not serve any purpose.
     
     The --route-delay and --route-method options are typically used on
     Windows to switch how routes are configured and delay the setup so the
     TUN/TAP interface has managed to be initialized first.  This is not
     needed on OpenVPN 3 Linux, as the openvpn3-service-netcfg service takes
     care of all of this and doing things in the right order and time.
     
     Since all of these three options does not break any configuration, they
     will just be ignored instead of being handled as an error.
     
     Signed-off-by: Romain Loutrel <un.romain.loutrel@gmail.com>
     Signed-off-by: David Sommerseth <davids@openvpn.net>

<https://github.com/OpenVPN/openvpn3-linux/commit/b1a270062e3d35dcf73f57340bd85fcb3d84b4cc>

Patch

Index: src/python/openvpn3/ConfigParser.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/python/openvpn3/ConfigParser.py b/src/python/openvpn3/ConfigParser.py
--- a/src/python/openvpn3/ConfigParser.py	(revision 20319752618587500d7d5bc496965d742ce161dc)
+++ b/src/python/openvpn3/ConfigParser.py	(revision 9cb300d007775fd68964e107f85cc3808d6e583c)
@@ -718,6 +718,13 @@ 
                              + 'Not needed with OpenVPN 3 which uses a '
                              + 'different privilege separation approach')
 
+        ignored.add_argument('--mute',
+                             metavar='SECS',
+                             action=ConfigParser.IgnoreArg,
+                             nargs=1,
+                             help='Silence repeating messages during n '
+                             + 'seconds. Not supported in OpenVPN3')
+
         ignored.add_argument('--nice',
                              metavar='LEVEL',
                              action=ConfigParser.IgnoreArg,
@@ -763,6 +770,19 @@ 
                              + 'retry resolve for n seconds before failing. '
                              + 'Not supported by OpenVPN 3')
 
+        ignored.add_argument('--route-delay',
+                             action=ConfigParser.IgnoreArg,
+                             nargs='*',
+                             help='Delay n seconds (default 0) after '
+                             + 'connection establishment, before adding '
+                             + ' routes. Not supported by OpenVPN 3.')
+
+        ignored.add_argument('--route-method',
+                             action=ConfigParser.IgnoreArg,
+                             nargs=1,
+                             help='Which method m to use for adding routes on '
+                             + 'Windows. Not supported by OpenVPN 3.')
+
         ignored.add_argument('--script-security',
                              metavar='LEVEL',
                              action=ConfigParser.IgnoreArg,