summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/config/config.go2
-rw-r--r--pkg/helper/darwin.go10
2 files changed, 10 insertions, 2 deletions
diff --git a/pkg/config/config.go b/pkg/config/config.go
index 18f6667..c174b6b 100644
--- a/pkg/config/config.go
+++ b/pkg/config/config.go
@@ -1,6 +1,6 @@
// Code generated by go generate; DO NOT EDIT.
// This file was generated by vendorize.py
-// At 2019-07-09 18:54:26
+// At 2019-07-16 21:41:09
package config
diff --git a/pkg/helper/darwin.go b/pkg/helper/darwin.go
index 49924e5..a1e1f00 100644
--- a/pkg/helper/darwin.go
+++ b/pkg/helper/darwin.go
@@ -102,13 +102,21 @@ func firewallStart(gateways []string) error {
}
func firewallStop() error {
- return exec.Command(pfctl, "-a", bitmask_anchor, "-F", "all").Run()
+ out, err := exec.Command(pfctl, "-a", bitmask_anchor, "-F", "all").Output()
+ if err != nil {
+ log.Printf("An error ocurred stopping the firewall: %v", out)
+ /* TODO return error if different from anchor not exists */
+ /*return errors.New("Error while stopping firewall")*/
+ return nil
+ }
+ return nil
}
func firewallIsUp() bool {
out, err := exec.Command(pfctl, "-a", bitmask_anchor, "-sr").Output()
if err != nil {
log.Printf("An error ocurred getting the status of the firewall: %v", err)
+ log.Printf(string(out))
return false
}
return bytes.Contains(out, []byte("block out proto udp to any port 53"))