Fix multicast detection on ended connections as well as some linter errors
This commit is contained in:
@@ -2,8 +2,6 @@ package base
|
||||
|
||||
import (
|
||||
"github.com/safing/portbase/database"
|
||||
|
||||
// Dependencies.
|
||||
_ "github.com/safing/portbase/database/dbmodule"
|
||||
_ "github.com/safing/portbase/database/storage/bbolt"
|
||||
)
|
||||
|
||||
@@ -17,8 +17,8 @@ func GetMulticastRequestConn(responseConn *Connection, responseFromNet *net.IPNe
|
||||
switch {
|
||||
case conn.Inbound:
|
||||
// Ignore incoming connections.
|
||||
//case conn.Ended != 0:
|
||||
// Ignore ended connections.
|
||||
case conn.Ended != 0:
|
||||
// Ignore ended connections.
|
||||
case conn.Entity.Protocol != responseConn.Entity.Protocol:
|
||||
// Ignore on protocol mismatch.
|
||||
case conn.LocalPort != responseConn.LocalPort:
|
||||
|
||||
@@ -6,8 +6,6 @@ import (
|
||||
"github.com/safing/portbase/database/migration"
|
||||
"github.com/safing/portbase/log"
|
||||
"github.com/safing/portbase/modules"
|
||||
|
||||
// Dependency.
|
||||
_ "github.com/safing/portmaster/core/base"
|
||||
"github.com/safing/portmaster/updates"
|
||||
)
|
||||
|
||||
@@ -7,9 +7,8 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/miekg/dns"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/safing/portbase/log"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user