This commit is contained in:
Alex Yang
2026-01-16 11:09:11 +08:00
parent 8159577be0
commit cdac4fcf43
284 changed files with 2813570 additions and 14 deletions

View File

@@ -0,0 +1,25 @@
## Problem
The build is failing because the HTTP server is trying to access DNSSEC-related fields (`DNSSECQueries`, `DNSSECSuccess`, `DNSSECFailed`, `DNSSECEnabled`) from the `dns.Stats` struct, but these fields don't exist in the struct definition.
## Solution
Add the missing DNSSEC-related fields to the `Stats` struct in `dns/server.go` and ensure they're properly initialized and updated.
## Implementation Steps
1. **Add DNSSEC fields to Stats struct** in `/root/dns/dns/server.go`:
- Add `DNSSECQueries int64` field
- Add `DNSSECSuccess int64` field
- Add `DNSSECFailed int64` field
- Add `DNSSECEnabled bool` field
2. **Initialize DNSSEC fields in NewServer** function:
- Set `DNSSECEnabled` based on config.EnableDNSSEC
- Initialize other DNSSEC fields to 0
3. **Update DNSSEC stats in query handling**:
- Increment `DNSSECQueries` when a DNSSEC query is processed
- Update `DNSSECSuccess` and `DNSSECFailed` based on DNSSEC validation results
4. **Test the fix** by running `go build` to ensure all errors are resolved
## Expected Outcome
The build will succeed and the HTTP server will be able to access the DNSSEC-related stats fields.