Skip to content
Closed
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
8 changes: 6 additions & 2 deletions dns/dnsmessage/svcb.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,14 @@ func (k SVCParamKey) GoString() string {
return printUint16(uint16(k))
}

func (r *SVCBResource) pack(msg []byte, compression map[string]uint16, compressionOff int) ([]byte, error) {
func (r *SVCBResource) pack(msg []byte, _ map[string]uint16, _ int) ([]byte, error) {
oldMsg := msg
msg = packUint16(msg, r.Priority)
msg, err := r.Target.pack(msg, compression, compressionOff)
// https://datatracker.ietf.org/doc/html/rfc3597#section-4 prohibits name
// compression for RR types that are not "well-known".
// https://datatracker.ietf.org/doc/html/rfc9460#section-2.2 explicitly states that
// compression of the Target is prohibited, following RFC 3597.
msg, err := r.Target.pack(msg, nil, 0)
if err != nil {
return oldMsg, &nestedError{"SVCBResource.Target", err}
}
Expand Down