From 02195d0e54f09f57028966583b9068959c06a2af Mon Sep 17 00:00:00 2001 From: DmitriyEshenko Date: Sat, 14 Sep 2019 21:00:33 +0000 Subject: [openvpn] T1662 Defined default remote port if it not set in cli --- src/op_mode/show_openvpn.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/op_mode/show_openvpn.py') 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 -- cgit v1.2.3