Skip to content

Commit

Permalink
net: Correct the code snippet erroneously rolled back in CL550435
Browse files Browse the repository at this point in the history
In CL https://golang.org/cl/550435, a segment that had already been reviewed and modified was rolled back due to an erroneous operation. Here, submit a correct code snippet.

Change-Id: I46adfad110d532aec5f557c350fe6dccbc583968
Reviewed-on: https://go-review.googlesource.com/c/go/+/565628
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: qiulaidongfeng <2645477756@qq.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Mateusz Poliwczak <mpoliwczak34@gmail.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Commit-Queue: Ian Lance Taylor <iant@golang.org>
  • Loading branch information
kkHAIKE authored and pull[bot] committed Mar 10, 2024
1 parent 4cdf2b7 commit 4613375
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/net/dnsclient_unix.go
Expand Up @@ -270,10 +270,10 @@ func extractExtendedRCode(p dnsmessage.Parser, hdr dnsmessage.Header) (dnsmessag
hasAdd := false
for {
ahdr, err := p.AdditionalHeader()
hasAdd = hasAdd || err != dnsmessage.ErrSectionDone
if err != nil {
return hdr.RCode, hasAdd
}
hasAdd = true
if ahdr.Type == dnsmessage.TypeOPT {
return ahdr.ExtendedRCode(hdr.RCode), hasAdd
}
Expand Down

0 comments on commit 4613375

Please sign in to comment.