Fix linting errors
This commit is contained in:
@@ -4,6 +4,7 @@ package nfq
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
ct "github.com/florianl/go-conntrack"
|
||||
@@ -35,7 +36,7 @@ func TeardownNFCT() {
|
||||
// DeleteAllMarkedConnection deletes all marked entries from the conntrack table.
|
||||
func DeleteAllMarkedConnection() error {
|
||||
if nfct == nil {
|
||||
return fmt.Errorf("nfq: nfct not initialized")
|
||||
return errors.New("nfq: nfct not initialized")
|
||||
}
|
||||
|
||||
// Delete all ipv4 marked connections
|
||||
@@ -87,7 +88,7 @@ func deleteMarkedConnections(nfct *ct.Nfct, f ct.Family) (deleted int) {
|
||||
// DeleteMarkedConnection removes a specific connection from the conntrack table.
|
||||
func DeleteMarkedConnection(conn *network.Connection) error {
|
||||
if nfct == nil {
|
||||
return fmt.Errorf("nfq: nfct not initialized")
|
||||
return errors.New("nfq: nfct not initialized")
|
||||
}
|
||||
|
||||
con := ct.Con{
|
||||
|
||||
@@ -612,18 +612,6 @@ func issueVerdict(conn *network.Connection, pkt packet.Packet, verdict network.V
|
||||
}
|
||||
}
|
||||
|
||||
// verdictRating rates the privacy and security aspect of verdicts from worst to best.
|
||||
var verdictRating = []network.Verdict{
|
||||
network.VerdictAccept, // Connection allowed in the open.
|
||||
network.VerdictRerouteToTunnel, // Connection allowed, but protected.
|
||||
network.VerdictRerouteToNameserver, // Connection allowed, but resolved via Portmaster.
|
||||
network.VerdictBlock, // Connection blocked, with feedback.
|
||||
network.VerdictDrop, // Connection blocked, without feedback.
|
||||
network.VerdictFailed,
|
||||
network.VerdictUndeterminable,
|
||||
network.VerdictUndecided,
|
||||
}
|
||||
|
||||
// func tunnelHandler(pkt packet.Packet) {
|
||||
// tunnelInfo := GetTunnelInfo(pkt.Info().Dst)
|
||||
// if tunnelInfo == nil {
|
||||
|
||||
Reference in New Issue
Block a user