diff --git a/modules/packet_proxy/packet_proxy_linux.go b/modules/packet_proxy/packet_proxy_linux.go index e69fe485..9a40fcff 100644 --- a/modules/packet_proxy/packet_proxy_linux.go +++ b/modules/packet_proxy/packet_proxy_linux.go @@ -16,15 +16,13 @@ import ( "github.com/evilsocket/islazy/fs" ) -type hookFunc func(q *nfqueue.Nfqueue, a nfqueue.Attribute) int - type PacketProxy struct { session.SessionModule chainName string rule string queue *nfqueue.Nfqueue queueNum int - queueCb hookFunc + queueCb func(q *nfqueue.Nfqueue, a nfqueue.Attribute) int pluginPath string plugin *plugin.Plugin } @@ -151,7 +149,7 @@ func (mod *PacketProxy) Configure() (err error) { return } else if sym, err = mod.plugin.Lookup("OnPacket"); err != nil { return - } else if mod.queueCb, ok = sym.(hookFunc); !ok { + } else if mod.queueCb, ok = sym.(func(q *nfqueue.Nfqueue, a nfqueue.Attribute) int); !ok { return fmt.Errorf("Symbol OnPacket is not a valid callback function.") }