Skip to content
This repository was archived by the owner on Aug 29, 2018. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pkg/go-netfilter-queue/netfilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ func (p *NFPacket) SetRequeueVerdict(newQueueId uint16) {
}

type NFQueue struct {
h *[0]byte
qh *[0]byte
h *C.struct_nfq_handle
qh *C.struct_nfq_q_handle
fd C.int
packets chan NFPacket
}
Expand Down Expand Up @@ -144,7 +144,7 @@ func (nfq *NFQueue) run() {
//export go_callback
func go_callback(queueId C.int, data *C.uchar, len C.int, cb *chan NFPacket) Verdict {
xdata := C.GoBytes(unsafe.Pointer(data), len)
packet := gopacket.NewPacket(xdata, layers.LayerTypeIPv4, gopacket.DecodeOptions{true, true})
packet := gopacket.NewPacket(xdata, layers.LayerTypeIPv4, gopacket.DecodeOptions{Lazy: true, NoCopy: true})
p := NFPacket{verdictChannel: make(chan Verdict), Packet: packet}
select {
case (*cb) <- p:
Expand Down