Adding new option support
Need to start nm-openvpn with --management-hold option. I added
args_add_strv (args, "--management-hold")
to nm-openvpn-service.c thinking that this would be passed on to the openvpn binary when its started but doing nmcli connection up client
returns Error: Connection activation failed: The connection attempt timed out
.
tail -f /var/log/syslog | grep VPN
May 17 11:02:27 salman-VirtualBox NetworkManager[14229]: [1558083747.1794] vpn-connection[0x558f6504c350,df78a141-c4c4-4e9a-afbc-fa85ea73b930,"client",0]: Started the VPN service, PID 20622
May 17 11:02:27 salman-VirtualBox NetworkManager[14229]: [1558083747.2052] vpn-connection[0x558f6504c350,df78a141-c4c4-4e9a-afbc-fa85ea73b930,"client",0]: VPN plugin: state changed: starting (3)
May 17 11:02:27 salman-VirtualBox NetworkManager[14229]: [1558083747.2053] vpn-connection[0x558f6504c350,df78a141-c4c4-4e9a-afbc-fa85ea73b930,"client",0]: VPN connection: (ConnectInteractive) reply received
May 17 11:02:27 salman-VirtualBox nm-openvpn[20625]: OpenVPN 2.4.4 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Sep 5 2018
May 17 11:03:27 salman-VirtualBox NetworkManager[14229]: [1558083807.6121] vpn-connection[0x558f6504c350,df78a141-c4c4-4e9a-afbc-fa85ea73b930,"client",0]: VPN connection: connect timeout exceeded.
May 17 11:03:27 salman-VirtualBox NetworkManager[14229]: [1558083807.6153] vpn-connection[0x558f6504c350,df78a141-c4c4-4e9a-afbc-fa85ea73b930,"client",0]: VPN plugin: failed: connect-failed (1)
May 17 11:03:27 salman-VirtualBox NetworkManager[14229]: [1558083807.6154] vpn-connection[0x558f6504c350,df78a141-c4c4-4e9a-afbc-fa85ea73b930,"client",0]: VPN plugin: state changed: stopping (5)
May 17 11:03:27 salman-VirtualBox NetworkManager[14229]: [1558083807.6154] vpn-connection[0x558f6504c350,df78a141-c4c4-4e9a-afbc-fa85ea73b930,"client",0]: VPN plugin: state changed: stopped (6)
May 17 11:03:27 salman-VirtualBox NetworkManager[14229]: [1558083807.6162] vpn-connection[0x558f6504c350,df78a141-c4c4-4e9a-afbc-fa85ea73b930,"client",0]: VPN service disappeared