Skip to content

Commit

Permalink
Do not run multiple BPF filters at once
Browse files Browse the repository at this point in the history
  • Loading branch information
buger committed May 23, 2016
1 parent 0ccace8 commit 98868e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion raw_socket_listener/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ func (t *Listener) readPcap() {

t.mu.Lock()
t.pcapHandles = append(t.pcapHandles, handle)
t.mu.Unlock()

if bpfSupported {
var bpf string
Expand All @@ -313,6 +312,8 @@ func (t *Listener) readPcap() {
return
}
}
t.mu.Unlock()

linkType := handle.LinkType()
source := gopacket.NewPacketSource(handle, linkType)
source.Lazy = true
Expand Down

0 comments on commit 98868e8

Please sign in to comment.