Skip to content

Commit

Permalink
ongoing fixes for TheNewNormal#105
Browse files Browse the repository at this point in the history
Signed-off-by: António Meireles <[email protected]>
  • Loading branch information
AntonioMeireles authored and bitlyvera committed Jan 8, 2019
1 parent 5bf33f8 commit 7ccaffe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/server/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ func (dns *DNSServer) PortForward() (err error) {
"from any to any port = domain -> %s port %v\n",
WatermarkHeader, session.Caller.Network.Address, EmbeddedDNSport)
pfRules.Close()
exec.Command("echo", "/sbin/pfctl", "-e").Run()
return exec.Command("echo", "/sbin/pfctl", "-a", "corectld-forwarding-dns",
exec.Command("/sbin/pfctl", "-e").Run()
return exec.Command("/sbin/pfctl", "-a", "corectld-forwarding-dns",
"-f", pfRules.Name()).Run()
}

Expand Down Expand Up @@ -158,7 +158,7 @@ type runner interface {
}

func teardownService() {
exec.Command("echo", "/sbin/pfctl", "-a", "corectld-forwarding-dns", "-Fa").Run()
exec.Command("/sbin/pfctl", "-a", "corectld-forwarding-dns", "-Fa").Run()
Daemon.DNSServer.rmRecord("corectld", session.Caller.Network.Address)
os.Remove("/etc/resolver/corectld")
}
Expand Down

0 comments on commit 7ccaffe

Please sign in to comment.