OpenVPN has several command line option to configure how to handle the
MTU of packets. The plugin accepts a OpenVPN.MTU options which is
translated to '--mtu'. This options not available (has it ever
existed?) since 2.0. We recommend at least version 2.2 of OpenVPN.

It looks like no one is using this, because if he did, OpenVPN bails
out and complains about unknown --mtu option.

In this light, let's drop it and add the exising MTU releated options.
---

Changes since v0
 - Update documation

 doc/vpn-config-format.txt | 9 ++++++++-
 vpn/plugins/openvpn.c     | 7 ++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/doc/vpn-config-format.txt b/doc/vpn-config-format.txt
index 23c9c14..1b49765 100644
--- a/doc/vpn-config-format.txt
+++ b/doc/vpn-config-format.txt
@@ -76,7 +76,14 @@ OpenVPN VPN supports following options (see openvpn(8) for 
details):
  OpenVPN.CACert         --ca             Certificate authority file (M)
  OpenVPN.Cert           --cert           Local peer's signed certificate (M)
  OpenVPN.Key            --key            Local peer's private key (M)
- OpenVPN.MTU            --mtu            MTU of the tunnel (O)
+ OpenVPN.LinkMTU       --link-mtu       Set the TCP/UDP device MTU
+                                        and derive the tun MTU (O)
+ OpenVPN.TunMTU                --tun-mtu        Take the tun/tap device MTU and
+                                        derive the TCP/UDP MTU from it (O)
+ OpenVPN.TunMTUExtra   --tun-mtu-extra  Assume that tun/tap device adds
+                                        additional overhead (O)
+ OpenVPN.Fragment      --fragment       Enable internal fragmenation (O)
+ OpenVPN.MSSFix                --mssfix         Set uppper bound on TCP MSS (O)
  OpenVPN.NSCertType     --ns-cert-type   Peer certificate type, value of
                                          either server or client (O)
  OpenVPN.Proto          --proto          Use protocol (O)
diff --git a/vpn/plugins/openvpn.c b/vpn/plugins/openvpn.c
index 9ee5795..04b7457 100644
--- a/vpn/plugins/openvpn.c
+++ b/vpn/plugins/openvpn.c
@@ -56,7 +56,12 @@ struct {
        { "OpenVPN.CACert", "--ca", 1 },
        { "OpenVPN.Cert", "--cert", 1 },
        { "OpenVPN.Key", "--key", 1 },
-       { "OpenVPN.MTU", "--mtu", 1 },
+       { "OpenVPN.LinkMTU", "--link-mtu", 1 },
+       { "OpenVPN.TunMTU", "--tun-mtu", 1 },
+       { "OpenVPN.TunMTUExtra", "--tun-mtu-extra", 1 },
+       { "OpenVPN.Fragment", "--fragment", 1 },
+       { "OpenVPN.MSSFix", "--mssfix", 1 },
+       { "OpenVPN.MTUDisc", "--mtu-disc", 1 },
        { "OpenVPN.NSCertType", "--ns-cert-type", 1 },
        { "OpenVPN.Proto", "--proto", 1 },
        { "OpenVPN.Port", "--port", 1 },
-- 
2.4.3

_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Reply via email to