Implement review feedback

This commit is contained in:
Daniel
2020-10-30 11:54:00 +01:00
parent ed00e1fe83
commit fa3f873c31
7 changed files with 64 additions and 28 deletions

View File

@@ -78,7 +78,7 @@ func notifyDisableDNSCache() {
func notifyRebootRequired() {
(&notifications.Notification{
EventID: "interception:©windows-dnscache-reboot-required",
EventID: "interception:windows-dnscache-reboot-required",
Message: "Please restart your system to complete Portmaster integration.",
Type: notifications.Warning,
}).Save()

View File

@@ -38,7 +38,9 @@ import (
const noReasonOptionKey = ""
var deciders = []func(context.Context, *network.Connection, packet.Packet) bool{
type deciderFn func(context.Context, *network.Connection, packet.Packet) bool
var deciders = []deciderFn{
checkPortmasterConnection,
checkSelfCommunication,
checkConnectionType,
@@ -152,7 +154,7 @@ func checkSelfCommunication(ctx context.Context, conn *network.Connection, pkt p
if err != nil {
log.Tracer(ctx).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", noReasonOptionKey)
conn.Accept("process internal connection", noReasonOptionKey)
conn.Internal = true
return true
}