From 1b76004a63754848554f310cb84542da8a246e24 Mon Sep 17 00:00:00 2001 From: Alexandr Stelnykovych Date: Fri, 11 Jul 2025 19:47:28 +0300 Subject: [PATCH] Minor cleanup in code comments --- .../interception/ebpf/connection_listener/worker.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/service/firewall/interception/ebpf/connection_listener/worker.go b/service/firewall/interception/ebpf/connection_listener/worker.go index 50c763f4..b52c168b 100644 --- a/service/firewall/interception/ebpf/connection_listener/worker.go +++ b/service/firewall/interception/ebpf/connection_listener/worker.go @@ -150,7 +150,7 @@ func loadBpfObjects_Ex(objs interface{}, opts *ebpf.CollectionOptions) error { return fmt.Errorf("ebpf: failed to modify program attach points: %w", err) } // Load the eBPF programs and maps into the kernel. - if err := spec.LoadAndAssign(objs, opts); err != nil { // object only has ONE tracing prog + if err := spec.LoadAndAssign(objs, opts); err != nil { return fmt.Errorf("ebpf: failed to load and assign ebpf objects: %w", err) } return nil @@ -159,13 +159,13 @@ func loadBpfObjects_Ex(objs interface{}, opts *ebpf.CollectionOptions) error { // modifyProgramAttachPoints modifies the attach points of the eBPF programs, if necessary. // This is needed to ensure compatibility with different kernel versions. func modifyProgramsAttachPoints(spec *ebpf.CollectionSpec) error { - // Load the kernel spec to find the udp_connect function. + // Load the kernel spec kspec, err := btf.LoadKernelSpec() if err != nil { return err } - // Function to update the attach point to single bpf program + // Function to update the attach point to a single BPF program updateIfNeeded := func(bpfProgramName, attachPoint, attachPointLegacy string) error { ps, ok := spec.Programs[bpfProgramName] if !ok {