summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDmitriyEshenko <snooppy@mail.ua>2019-09-14 21:00:33 +0000
committerDmitriyEshenko <snooppy@mail.ua>2019-09-14 21:00:33 +0000
commit02195d0e54f09f57028966583b9068959c06a2af (patch)
tree22b7e911ea2d7fb84c898312143dec81d516892d /src
parent5a132333955be5d557a6f57bb783b898cababbf4 (diff)
downloadvyos-1x-02195d0e54f09f57028966583b9068959c06a2af.tar.gz
vyos-1x-02195d0e54f09f57028966583b9068959c06a2af.zip
[openvpn] T1662 Defined default remote port if it not set in cli
Diffstat (limited to 'src')
-rwxr-xr-xsrc/op_mode/show_openvpn.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/op_mode/show_openvpn.py b/src/op_mode/show_openvpn.py
index eafb645de..577ed7eb7 100755
--- a/src/op_mode/show_openvpn.py
+++ b/src/op_mode/show_openvpn.py
@@ -162,6 +162,10 @@ if __name__ == '__main__':
remote_host = config.return_effective_values('interfaces openvpn {} remote-host'.format(intf))
remote_port = config.return_effective_value('interfaces openvpn {} remote-port'.format(intf))
+
+ if not remote_port:
+ remote_port = '1194'
+
if len(remote_host) >= 1:
client['remote'] = str(remote_host[0]) + ':' + remote_port