diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 734f1770..35e477a6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -127,3 +127,12 @@ jobs: - name: Build the Docker image run: | docker build --build-arg VERSION=dev . --file Dockerfile -t go-dnscollector + + docker32b: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Build the Docker image + run: | + docker build --build-arg VERSION=dev . --platform linux/386 --file Dockerfile -t go-dnscollector diff --git a/dnsutils/message.go b/dnsutils/message.go index 83c92377..7d511fb0 100644 --- a/dnsutils/message.go +++ b/dnsutils/message.go @@ -811,7 +811,7 @@ func (dm *DNSMessage) ToDNSTap(extended bool) ([]byte, error) { if dm.NetworkInfo.ResponsePort != "-" { if port, err := strconv.Atoi(dm.NetworkInfo.ResponsePort); err != nil { return nil, err - } else if port < 0 || port > math.MaxUint32 { + } else if port < 0 || port > 65535 { return nil, errors.New("invalid response port value") } else { rport = uint32(port) @@ -821,7 +821,7 @@ func (dm *DNSMessage) ToDNSTap(extended bool) ([]byte, error) { if dm.NetworkInfo.QueryPort != "-" { if port, err := strconv.Atoi(dm.NetworkInfo.QueryPort); err != nil { return nil, err - } else if port < 0 || port > math.MaxUint32 { + } else if port < 0 || port > 65535 { return nil, errors.New("invalid query port value") } else { qport = uint32(port)