shill: Catch common openvpn connection errors
If the VPN connection fails, the management interface will indicate
that the state has changed to RECONNECTING. This happens on both
real reconnects and on failed initial connects. shill's current logic
always responds by telling openvpn to retry, but that is the wrong
thing to do in the case of a DNS lookup failure or server cert
validation failure. Recognize these events and promptly abort
the connection attempt if they happen.
BUG=chromium:297379
TEST=autotests
TEST=connect to VPN with CA cert set to Default
TEST=connect to VPN with bogus hostname
TEST=suspend/resume and verify that "legit" reconnections still work
Change-Id: I359e9ba1a0570e12d61aefa61834575212e31fa6
Reviewed-on: https://chromium-review.googlesource.com/1013547
Commit-Ready: Kevin Cernekee <cernekee@chromium.org>
Tested-by: Kevin Cernekee <cernekee@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
2 files changed