we need this because for some reason we can't directly pass the symbol loaded from the plugin as a direct CGO callback ... ¯\_(ツ)_/¯
(attribute nfqueue.Attribute)
| 197 | // pass the symbol loaded from the plugin as a direct |
| 198 | // CGO callback ... ¯\_(ツ)_/¯ |
| 199 | func dummyCallback(attribute nfqueue.Attribute) int { |
| 200 | if mod.queueCb != nil { |
| 201 | return mod.queueCb(mod.queue, attribute) |
| 202 | } else { |
| 203 | id := *attribute.PacketID |
| 204 | |
| 205 | mod.Info("[%d] %v", id, *attribute.Payload) |
| 206 | |
| 207 | mod.queue.SetVerdict(id, nfqueue.NfAccept) |
| 208 | return 0 |
| 209 | } |
| 210 | } |
| 211 | |
| 212 | func (mod *PacketProxy) Start() error { |
| 213 | if mod.Running() { |