-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid network device errors when disconnecting from VPN #99
Avoid network device errors when disconnecting from VPN #99
Conversation
When disconnecting from the VPN, the openconnect subprocess terminates and removes the VPN network device. Currently, openconnect can terminate before all teardown methods in VPNSetup are run. The teardown commands that set the network device down or revert the systemd-resolved configuration for the device then fail, because the device does not exist anymore. To avoid such errors - Wait for completion of the setup and teardown commands in VPNSetup, so vpnscript and the openconnect subprocess have to wait and do not terminate before teardown is complete. - Disconnect from the VPN before stopping OCRunner when Daemon is shutting down, to ensure openconnect is still running during teardown. - Run openconnect in own process group so it gets not canceled by the interrupt signal sent to trigger the Daemon shutdown. Signed-off-by: hwipl <33433250+hwipl@users.noreply.github.com>
Test Result🙌 258 Tests pass Test Details🟢 TestAddrMonStartStop (0.00s) CoverageTotal coverage: 🟩🟩🟩🟥 79.1% Coverage Details
|
When disconnecting from the VPN, the openconnect subprocess terminates and removes the VPN network device. Currently, openconnect can terminate before all teardown methods in VPNSetup are run. The teardown commands that set the network device down or revert the systemd-resolved configuration for the device then fail, because the device does not exist anymore. To avoid such errors