Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[connman-vpn] Improve auto connection of VPNs. Contributes to JB#42337
Added more checks for run_vpn_auto_connect(): 1) delay connecting of VPN if the current default service is not yet online but in ready state and 2) stop VPN auto connection if there is no default service in online state or the default service is connected VPN. This will be added to main loop when there is a change in the default service. Additionally keep the run_vpn_auto_connect() in main loop with 1s delay after the first run in order to re-connect any VPN that should be connected. Because of errors in network conditions the VPN can get disconnected for a multiple reasons. By keeping the auto connect function in the main loop the VPN that should be connected will be attempted until user decides to disable it. If there is no VPN to automatically connect remove it from main loop. Removed unsetting of VPN autoconnect in vpn/plugins/vpn.c:vpn_notify() to make the toggling of autoconnect setting completely a user setting. ConnMan should not disable it for the first error it encounters. Added vpn_auto_connect() to each location where service autoconnection was used for VPNs - run_auto_connect() skips VPN services. Now in case of addition, removal, disconnect or failure vpn auto connect will be added to mainloop. A helper function, do_auto_connect() was added to run appropriate auto connect function.
- Loading branch information
1 parent
3749fb9
commit e0daaad
Showing
2 changed files
with
107 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters