Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow setting the DO flag without having to explicitly enable an EDNS…
Browse files Browse the repository at this point in the history
… option
mohshami committed Jan 27, 2024
1 parent bbd6081 commit ea2e927
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
@@ -149,18 +149,17 @@ func main() {
{Name: domain + ".", Qtype: rrType, Qclass: class},
}

opt := getOrCreateOpt(req, do)

if subnetOpt != nil {
opt := getOrCreateOpt(req, do)
opt.Option = append(opt.Option, subnetOpt)
}

if ednsOpt != nil {
opt := getOrCreateOpt(req, do)
opt.Option = append(opt.Option, ednsOpt)
}

if padding {
opt := getOrCreateOpt(req, do)
opt.Option = append(opt.Option, newEDNS0Padding(req))
}

0 comments on commit ea2e927

Please sign in to comment.