From ecbf63fddd2c6f6bca5c6ab3c64260642ad4bb10 Mon Sep 17 00:00:00 2001 From: Josh Deprez Date: Sun, 21 Apr 2024 14:53:33 +1000 Subject: [PATCH] Fix parseDomainIdentifier --- aurp/domain.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aurp/domain.go b/aurp/domain.go index edaffe6..9875c5a 100644 --- a/aurp/domain.go +++ b/aurp/domain.go @@ -78,6 +78,7 @@ func ParseDomainHeader(b []byte) (DomainHeader, []byte, error) { // DomainIdentifier is the byte representation of a domain identifier. type DomainIdentifier interface { + fmt.Stringer io.WriterTo } @@ -149,7 +150,7 @@ func parseDomainIdentifier(b []byte) (DomainIdentifier, []byte, error) { if lf != 7 { return nil, b, fmt.Errorf("incorrect length %d for IP domain identifier", lf) } - return IPDomainIdentifier(b[5:8]), b[8:], nil + return IPDomainIdentifier(b[4:8]), b[8:], nil default: return nil, b, fmt.Errorf("unknown domain identifier authority %d", b[1])