aports/testing/popeye/fix-cilium-integer-overflow_patch
2025-01-02 19:38:40 +00:00

23 lines
897 B
Text

Patch-Source: https://github.com/cilium/cilium/commit/a802f91a6de0edaf5b1e2e48845bcf85de23b563
diff --git a/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/probes.go b/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/probes.go
index 72b69afbb0f49..dcf0950dcdf26 100644
--- a/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/probes.go
+++ b/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/probes.go
@@ -9,6 +9,7 @@ import (
"errors"
"fmt"
"io"
+ "math"
"net"
"os"
"path/filepath"
@@ -495,7 +496,7 @@ var HaveNetkit = sync.OnceValue(func() error {
l, err := link.AttachNetkit(link.NetkitOptions{
Program: prog,
Attach: ebpf.AttachNetkitPrimary,
- Interface: int(^uint32(0)),
+ Interface: math.MaxInt,
})
// We rely on this being checked during the syscall. With
// an otherwise correct payload we expect ENODEV here as