Merge branch 'master' into debian

pull/23/head v0.0.3
Bruce Leidl 9 years ago
commit 81026f275c

@ -1,6 +1,6 @@
{ {
"description": "Firewall Extension", "description": "Firewall Extension",
"shell-version": ["3.18"], "shell-version": ["3.18", "3.20"],
"uuid": "firewall@subgraph.com", "uuid": "firewall@subgraph.com",
"name": "Firewall Extension", "name": "Firewall Extension",
"settings-schema": "com.subgraph.firewall" "settings-schema": "com.subgraph.firewall"

@ -111,8 +111,11 @@ func (fw *Firewall) runFilter() {
q.Timeout = 5 * time.Minute q.Timeout = 5 * time.Minute
packets := q.Process() packets := q.Process()
sigs := make(chan os.Signal, 1) sigKillChan := make(chan os.Signal, 1)
signal.Notify(sigs, os.Interrupt, os.Kill) signal.Notify(sigKillChan, os.Interrupt, os.Kill)
sigHupChan := make(chan os.Signal, 1)
signal.Notify(sigHupChan, syscall.SIGHUP)
for { for {
select { select {
@ -122,7 +125,9 @@ func (fw *Firewall) runFilter() {
} else { } else {
pkt.Accept() pkt.Accept()
} }
case <-sigs: case <-sigHupChan:
fw.loadRules()
case <-sigKillChan:
return return
} }
} }

Loading…
Cancel
Save