Skip to content

net/dns: Increase UDP response buffer to 1232 bytes #51128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/net/dnsclient_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func dnsPacketRoundTrip(c Conn, id uint16, query dnsmessage.Question, b []byte)
return dnsmessage.Parser{}, dnsmessage.Header{}, err
}

b = make([]byte, 512) // see RFC 1035
b = make([]byte, 1232) // see RFC 6891, https://dnsflagday.net/2020/
for {
n, err := c.Read(b)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion src/net/dnsclient_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ func (f *fakeDNSPacketConn) Close() error {
func TestIgnoreDNSForgeries(t *testing.T) {
c, s := Pipe()
go func() {
b := make([]byte, 512)
b := make([]byte, 1232)
n, err := s.Read(b)
if err != nil {
t.Error(err)
Expand Down