pull/41/head
xSmurf 8 years ago
parent f750840b23
commit 2e6f98e410

@ -28,7 +28,7 @@ func (ob *dbusObject) isEnabled() (bool, error) {
func (ob *dbusObject) listRules() ([]sgfw.DbusRule, error) {
rules := []sgfw.DbusRule{}
err := ob.Call("com.subgraph.Firewall.ListRules", 0).Store(&rules);
err := ob.Call("com.subgraph.Firewall.ListRules", 0).Store(&rules)
if err != nil {
return nil, err
}

@ -46,8 +46,8 @@ var RuleModeValue = map[string]RuleMode {
"SYSTEM": RULE_MODE_SYSTEM,
}
type FilterScope uint16
const (
APPLY_ONCE FilterScope = iota
APPLY_SESSION
@ -66,7 +66,6 @@ var FilterScopeValue = map[string]FilterScope {
"FOREVER": APPLY_FOREVER,
}
func GetFilterScopeString(scope FilterScope) string {
if val, ok := FilterScopeString[scope]; ok {
return val

@ -247,7 +247,7 @@ func printPacket(pkt *nfqueue.Packet, hostname string, pinfo *procsnitch.Info) s
if name == "" {
name = pkt.Dst.String()
}
if (pinfo == nil) {
if pinfo == nil {
return fmt.Sprintf("(%s %s:%d -> %s:%d)", proto, pkt.Src, pkt.SrcPort, name, pkt.DstPort)
} else {
return fmt.Sprintf("%s %s %s:%d -> %s:%d", pinfo.ExePath, proto, pkt.Src, pkt.SrcPort, name, pkt.DstPort)

Loading…
Cancel
Save