Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[openvpn] Corrected wrong "client" mode: "p2p"
  • Loading branch information
nemesifier committed Sep 21, 2016
1 parent c15c630 commit b486c4d
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions docs/source/backends/openvpn.rst
Expand Up @@ -91,7 +91,7 @@ Required properties:
+==========================+=========+==============+=============================================================+
| ``name`` | string | | 2 to 24 alphanumeric characters, dashes and underscores |
+--------------------------+---------+--------------+-------------------------------------------------------------+
| ``mode`` | string | | ``client`` or ``server`` |
| ``mode`` | string | | ``p2p`` or ``server`` |
+--------------------------+---------+--------------+-------------------------------------------------------------+
| ``proto`` | string | | ``udp``, ``tcp-client``, ``tcp-server`` |
+--------------------------+---------+--------------+-------------------------------------------------------------+
Expand Down Expand Up @@ -269,7 +269,7 @@ Will be rendered as::
dev tap0
dev-type tap
key key.pem
mode client
mode p2p
nobind
proto udp
remote vpn1.test.com 1195
Expand Down
2 changes: 1 addition & 1 deletion docs/source/backends/openwisp.rst
Expand Up @@ -231,7 +231,7 @@ The following example shows a full working *configuration dictionary* for the
"keepalive": "5 40",
"key": "/tmp/owispmanager/openvpn/x509/l2vpn_client_2693.pem",
"ns_cert_type": "server",
"mode": "client",
"mode": "p2p",
"enabled": True,
"comp_lzo": "yes",
"down": "/tmp/owispmanager/openvpn/vpn_2693_script_down.sh",
Expand Down
2 changes: 1 addition & 1 deletion netjsonconfig/backends/openvpn/openvpn.py
Expand Up @@ -61,7 +61,7 @@ def auto_client(self, host, server, ca_path=None, ca_contents=None,
"""
# client defaults
c = {
"mode": "client",
"mode": "p2p",
"nobind": True,
"resolv_retry": True,
"tls_client": True
Expand Down
2 changes: 1 addition & 1 deletion netjsonconfig/backends/openvpn/schema.py
Expand Up @@ -363,7 +363,7 @@
"type": "object",
"required": ["remote"],
"properties": {
"mode": {"enum": ["client"]},
"mode": {"enum": ["p2p"]},
"proto": {
"enum": ["udp", "tcp-client"],
"default": "udp",
Expand Down
12 changes: 6 additions & 6 deletions tests/openvpn/test_backend.py
Expand Up @@ -116,7 +116,7 @@ def test_client_mode(self):
"key": "key.pem",
"local": "",
"log": "/var/log/openvpn.log",
"mode": "client",
"mode": "p2p",
"mssfix": 1450,
"mtu_disc": "yes",
"mtu_test": True,
Expand Down Expand Up @@ -165,7 +165,7 @@ def test_client_mode(self):
down /home/user/down-command.sh
key key.pem
log /var/log/openvpn.log
mode client
mode p2p
mssfix 1450
mtu-disc yes
mtu-test
Expand Down Expand Up @@ -401,7 +401,7 @@ def test_auto_client_simple(self):
dev tap0
dev-type tap
key key.pem
mode client
mode p2p
nobind
proto udp
remote vpn1.test.com 1195
Expand Down Expand Up @@ -431,7 +431,7 @@ def test_auto_client_tls(self):
dev tap0
dev-type tap
key key.pem
mode client
mode p2p
nobind
proto tcp-client
remote vpn2.test.com 1196
Expand Down Expand Up @@ -474,7 +474,7 @@ def test_auto_client_complex(self):
dev tap0
dev-type tap
key {{key_path_1}}
mode client
mode p2p
nobind
ns-cert-type server
proto tcp-client
Expand Down Expand Up @@ -524,7 +524,7 @@ def test_auto_client_ns_cert_type_empty(self):
dev tap0
dev-type tap
key key.pem
mode client
mode p2p
nobind
proto udp
remote vpn1.test.com 1195
Expand Down
2 changes: 1 addition & 1 deletion tests/openwisp/test_backend.py
Expand Up @@ -75,7 +75,7 @@ class TestBackend(unittest.TestCase, _TabsMixin):
"keepalive": "5 40",
"key": "/tmp/owispmanager/openvpn/x509/l2vpn_client_2693.pem",
"log": "/tmp/openvpn_2693.log",
"mode": "client",
"mode": "p2p",
"mute": 10,
"mute_replay_warnings": True,
"name": "2693",
Expand Down
4 changes: 2 additions & 2 deletions tests/openwrt/test_openvpn.py
Expand Up @@ -120,7 +120,7 @@ def test_client_mode(self):
"key": "key.pem",
"local": "",
"log": "/var/log/openvpn.log",
"mode": "client",
"mode": "p2p",
"mssfix": 1450,
"mtu_disc": "yes",
"mtu_test": True,
Expand Down Expand Up @@ -171,7 +171,7 @@ def test_client_mode(self):
option enabled '1'
option key 'key.pem'
option log '/var/log/openvpn.log'
option mode 'client'
option mode 'p2p'
option mssfix '1450'
option mtu_disc 'yes'
option mtu_test '1'
Expand Down

0 comments on commit b486c4d

Please sign in to comment.