Skip to content

Commit

Permalink
Merge pull request #161 from coroot/disabled_nf_conntrack
Browse files Browse the repository at this point in the history
handle missing `nf_conntrack` gracefully
  • Loading branch information
def authored Dec 23, 2024
2 parents f6185e0 + da1d263 commit 1da58fa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ebpftracer/tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,12 @@ const nfConntrackEventsParameterPath = "/proc/sys/net/netfilter/nf_conntrack_eve
func ensureConntrackEventsAreEnabled() error {
v, err := common.ReadUintFromFile(nfConntrackEventsParameterPath)
if err != nil {
if common.IsNotExist(err) {
klog.Warningf(
"unable to check the value of %s, it appears that nf_conntrack is not loaded: %s",
nfConntrackEventsParameterPath, err)
return nil
}
return err
}
if v != 1 {
Expand Down

0 comments on commit 1da58fa

Please sign in to comment.