From f2f7aad7cf43835b6d02d5b04bd356e6ffd7b7b5 Mon Sep 17 00:00:00 2001 From: boratanrikulu Date: Sat, 27 Jul 2024 18:54:54 +0300 Subject: [PATCH] fix broken `ListSrc()` and `ListDNS()` --- .github/workflows/test.yml | 2 +- internal/ebpf/list.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 70a01ac..e6635bc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: - name: Set up Go 1.x uses: actions/setup-go@v2 with: - go-version: ^1.19 + go-version: ^1.21 - name: Check out code into the Go module directory uses: actions/checkout@v2 diff --git a/internal/ebpf/list.go b/internal/ebpf/list.go index bdf0742..6cf76f7 100644 --- a/internal/ebpf/list.go +++ b/internal/ebpf/list.go @@ -16,7 +16,7 @@ func (e *EBPF) ListSrc() (map[string]int, error) { entries := e.Objects.DropSrcAddrs.Iterate() for { var key uint32 - var value uint8 + var value int64 if next := entries.Next(&key, &value); !next { break } @@ -36,7 +36,7 @@ func (e *EBPF) ListDNS() (map[string]int, error) { entries := e.Objects.DropDns.Iterate() for { var key [bytesLength]byte - var value uint8 + var value int64 if next := entries.Next(&key, &value); !next { break }