]> Cypherpunks repositories - gostls13.git/commit
net: send EDNS(0) packet length in DNS query
authorIan Lance Taylor <iant@golang.org>
Fri, 11 Feb 2022 04:09:07 +0000 (20:09 -0800)
committerIan Lance Taylor <iant@golang.org>
Sat, 12 Feb 2022 05:44:16 +0000 (05:44 +0000)
commitf14ad78e844d7dff286421754c462886336b1eb6
tree3b2d8a17da9685a8af65d18ba83a9cf9cd3f7107
parentbadba359da9f09dfd75d81c7175b78eb1dbc998f
net: send EDNS(0) packet length in DNS query

We used to only accept up to 512 bytes in a DNS packet, per RFC 1035.
Increase the size we accept to 1232 bytes, per https://dnsflagday.net/2020/,
and advertise that larger limit in a EDNS(0) OPT record.

Fixes #6464
Fixes #21160
Fixes #44135
Fixes #51127

Change-Id: I496a294e9a8015de4161cbc1825b0dc5b4e9f5d8
Reviewed-on: https://go-review.googlesource.com/c/go/+/385035
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/net/dnsclient_unix.go
src/net/dnsclient_unix_test.go