summaryrefslogtreecommitdiff
path: root/standalone/vpn.go
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2019-01-09 12:49:33 +0100
committerRuben Pollan <meskio@sindominio.net>2019-01-09 12:49:33 +0100
commitf274ec2beaf060cc8bfe4f5eb6f2ce3b5c6aa1f3 (patch)
tree198930362039654cc03b50703512ce1ca6819003 /standalone/vpn.go
parent9434d2534b0031c20de64ba03518aa7a150b265d (diff)
[feat] use firewall status to check if the vpn is in failed status
If openvpn is off, but the firewall is up, we are in a fail-close status and we should report it properly. - Resolves: #97
Diffstat (limited to 'standalone/vpn.go')
-rw-r--r--standalone/vpn.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/standalone/vpn.go b/standalone/vpn.go
index e3ecca4..0ff090c 100644
--- a/standalone/vpn.go
+++ b/standalone/vpn.go
@@ -88,6 +88,9 @@ func (b *Bitmask) GetStatus() (string, error) {
if err != nil {
status = Off
}
+ if status == Off && b.launch.firewallIsUp() {
+ return Failed, nil
+ }
return status, nil
}