Support the zero length EDNS0 EXPIRE option (#1065)
* Support the zero length EDNS0 EXPIRE option * EDNS0 EXPIRE: Just reference the RFC, don't link to it Co-Authored-By: Miek Gieben <miek@miek.nl> Co-authored-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
parent
ba5b1f0bae
commit
e636c10380
4
edns.go
4
edns.go
|
@ -543,6 +543,10 @@ func (e *EDNS0_EXPIRE) pack() ([]byte, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *EDNS0_EXPIRE) unpack(b []byte) error {
|
func (e *EDNS0_EXPIRE) unpack(b []byte) error {
|
||||||
|
if len(b) == 0 {
|
||||||
|
// zero-length EXPIRE query, see RFC 7314 Section 2
|
||||||
|
return nil
|
||||||
|
}
|
||||||
if len(b) < 4 {
|
if len(b) < 4 {
|
||||||
return ErrBuf
|
return ErrBuf
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue