Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update google/gopacket library #3606

Merged
merged 2 commits into from
Sep 23, 2019
Merged
Show file tree
Hide file tree
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 probe/endpoint/dns_snooper.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"bytes"
"encoding/binary"
"fmt"
"math"
"sync"
"time"

Expand Down Expand Up @@ -60,9 +59,10 @@ func newPcapHandle() (*pcap.Handle, error) {
return nil, err
}
defer inactive.CleanUp()
// pcap timeout blackmagic copied from Weave Net to reduce CPU consumption
// Set a long timeout because "pcap.BlockForever" actually spins on a 10ms timeout
// see https://github.com/weaveworks/weave/commit/025315363d5ea8b8265f1b3ea800f24df2be51a4
if err = inactive.SetTimeout(time.Duration(math.MaxInt64)); err != nil {
// (note the value in microseconds has to fit in a 32-bit signed int)
if err = inactive.SetTimeout(time.Minute * 30); err != nil {
return nil, err
}
if err = inactive.SetImmediateMode(true); err != nil {
Expand Down
77 changes: 59 additions & 18 deletions vendor/github.com/google/gopacket/afpacket/afpacket.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 44 additions & 7 deletions vendor/github.com/google/gopacket/afpacket/header.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 26 additions & 9 deletions vendor/github.com/google/gopacket/afpacket/options.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading