Implement review suggestions

This commit is contained in:
Daniel
2020-04-20 13:57:07 +02:00
parent 033dceab5b
commit a33808685c
15 changed files with 90 additions and 61 deletions

View File

@@ -233,7 +233,7 @@ func initialHandler(conn *network.Connection, pkt packet.Packet) {
if ps.isMe {
// approve
conn.Accept("internally approved")
conn.Hidden = true
conn.Internal = true
// finish
conn.StopFirewallHandler()
issueVerdict(conn, pkt, 0, true)

View File

@@ -50,7 +50,7 @@ func DecideOnConnection(conn *network.Connection, pkt packet.Packet) { //nolint:
if conn.Process().Pid == os.Getpid() {
log.Infof("filter: granting own connection %s", conn)
conn.Verdict = network.VerdictAccept
conn.Hidden = true
conn.Internal = true
return
}
@@ -76,7 +76,7 @@ func DecideOnConnection(conn *network.Connection, pkt packet.Packet) { //nolint:
log.Warningf("filter: failed to find load local peer process with PID %d: %s", otherPid, err)
} else if otherProcess.Pid == conn.Process().Pid {
conn.Accept("connection to self")
conn.Hidden = true
conn.Internal = true
return
}
}