Skip to content

Commit

Permalink
handle missing nf_conntrack gracefully
Browse files Browse the repository at this point in the history
  • Loading branch information
def committed Dec 23, 2024
1 parent f6185e0 commit da1d263
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 da1d263

Please sign in to comment.