Add check to ensure matching PID constants
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"golang.org/x/sync/singleflight"
|
||||
|
||||
"github.com/safing/portbase/log"
|
||||
"github.com/safing/portmaster/network/socket"
|
||||
"github.com/safing/portmaster/profile"
|
||||
)
|
||||
|
||||
@@ -28,6 +29,13 @@ const (
|
||||
NetworkHostProcessID = -255
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Check required matching values.
|
||||
if UndefinedProcessID != socket.UndefinedProcessID {
|
||||
panic("UndefinedProcessID does not match socket.UndefinedProcessID")
|
||||
}
|
||||
}
|
||||
|
||||
var (
|
||||
// unidentifiedProcess is used for non-attributed outgoing connections.
|
||||
unidentifiedProcess = &Process{
|
||||
|
||||
Reference in New Issue
Block a user