dns/dnsmessage: document that Skip does not fully validate the header

The Skip methods do not fully validate the name in header,
the compression pointers are not followed

Change-Id: If34a041d799a22117afac9bd23e76606f5d0c8f7
GitHub-Last-Rev: f8f2586fb2528308f0b130c64cc7c13ca7820607
GitHub-Pull-Request: golang/net#196
Reviewed-on: https://go-review.googlesource.com/c/net/+/534175
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
diff --git a/dns/dnsmessage/message.go b/dns/dnsmessage/message.go
index b6b4f9c..42987ab 100644
--- a/dns/dnsmessage/message.go
+++ b/dns/dnsmessage/message.go
@@ -751,6 +751,9 @@
 }
 
 // SkipAnswer skips a single Answer Resource.
+//
+// It does not perform a complete validation of the resource header, which means
+// it may return a nil error when the [AnswerHeader] would actually return an error.
 func (p *Parser) SkipAnswer() error {
 	return p.skipResource(sectionAnswers)
 }
@@ -801,6 +804,9 @@
 }
 
 // SkipAuthority skips a single Authority Resource.
+//
+// It does not perform a complete validation of the resource header, which means
+// it may return a nil error when the [AuthorityHeader] would actually return an error.
 func (p *Parser) SkipAuthority() error {
 	return p.skipResource(sectionAuthorities)
 }
@@ -851,6 +857,9 @@
 }
 
 // SkipAdditional skips a single Additional Resource.
+//
+// It does not perform a complete validation of the resource header, which means
+// it may return a nil error when the [AdditionalHeader] would actually return an error.
 func (p *Parser) SkipAdditional() error {
 	return p.skipResource(sectionAdditionals)
 }