Vendor update gopacket and unix package
This commit is contained in:
1 parent
54d24e65ef
commit
43d3339b39
319 files changed
+91339
-13246
No files matched your search
+6
-1
@@ -16,6 +16,7 @@ import (
|
||||
"reflect"
|
||||
"runtime/debug"
|
||||
"strings"
|
||||
"syscall"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -31,6 +32,10 @@ type CaptureInfo struct {
|
||||
Length int
|
||||
// InterfaceIndex
|
||||
InterfaceIndex int
|
||||
// The packet source can place ancillary data of various types here.
|
||||
// For example, the afpacket source can report the VLAN of captured
|
||||
// packets this way.
|
||||
AncillaryData []interface{}
|
||||
}
|
||||
|
||||
// PacketMetadata contains metadata for a packet.
|
||||
@@ -810,7 +815,7 @@ func (p *PacketSource) packetsToChannel() {
|
||||
defer close(p.c)
|
||||
for {
|
||||
packet, err := p.NextPacket()
|
||||
if err == io.EOF {
|
||||
if err == io.EOF || err == syscall.EBADF {
|
||||
return
|
||||
} else if err == nil {
|
||||
p.c <- packet
|
||||
|
||||
Reference in new issue
Block a user