Fix linter warnings

This commit is contained in:
Vladimir 2022-11-09 12:23:53 +01:00
parent a04b76ff58
commit 852fb32bbd
3 changed files with 6 additions and 6 deletions

View file

@ -21,7 +21,7 @@ func ResetVerdictOfAllConnections() error {
return nfq.DeleteAllMarkedConnection() return nfq.DeleteAllMarkedConnection()
} }
// UpdateVerdictOfConnection deletes the verdict of specific connection so in can be initialized again with the next packet // UpdateVerdictOfConnection deletes the verdict of specific connection so in can be initialized again with the next packet.
func UpdateVerdictOfConnection(conn *network.Connection) error { func UpdateVerdictOfConnection(conn *network.Connection) error {
return nfq.DeleteMarkedConnection(conn) return nfq.DeleteMarkedConnection(conn)
} }

View file

@ -41,12 +41,12 @@ func ResetVerdictOfAllConnections() error {
return windowskext.ClearCache() return windowskext.ClearCache()
} }
// UpdateVerdictOfConnection updates the verdict of specific connection in the kernel extension // UpdateVerdictOfConnection updates the verdict of specific connection in the kernel extension.
func UpdateVerdictOfConnection(conn *network.Connection) error { func UpdateVerdictOfConnection(conn *network.Connection) error {
return windowskext.UpdateVerdict(conn) return windowskext.UpdateVerdict(conn)
} }
// GetKextVersion returns the version of the kernel extension // GetKextVersion returns the version of the kernel extension.
func GetKextVersion() (string, error) { func GetKextVersion() (string, error) {
version, err := windowskext.GetVersion() version, err := windowskext.GetVersion()
if err != nil { if err != nil {

View file

@ -13,7 +13,7 @@ import (
"github.com/safing/portmaster/network" "github.com/safing/portmaster/network"
) )
var nfct *ct.Nfct // Conntrack handler. NFCT: Network Filter Connection Tracking var nfct *ct.Nfct // Conntrack handler. NFCT: Network Filter Connection Tracking.
// InitNFCT initializes the network filter conntrack library // InitNFCT initializes the network filter conntrack library
func InitNFCT() error { func InitNFCT() error {
@ -25,7 +25,7 @@ func InitNFCT() error {
return nil return nil
} }
// DeinitNFCT deinitializes the network filter conntrack library // DeinitNFCT deinitializes the network filter conntrack library.
func DeinitNFCT() { func DeinitNFCT() {
_ = nfct.Close() _ = nfct.Close()
} }
@ -82,7 +82,7 @@ func deleteMarkedConnections(nfct *ct.Nfct, f ct.Family) (deleted int) {
return deleted return deleted
} }
// DeleteMarkedConnection removes a specific connection from the conntrack table // DeleteMarkedConnection removes a specific connection from the conntrack table.
func DeleteMarkedConnection(conn *network.Connection) error { func DeleteMarkedConnection(conn *network.Connection) error {
if nfct == nil { if nfct == nil {
return fmt.Errorf("nfq: nfct not initialized") return fmt.Errorf("nfq: nfct not initialized")