diff --git a/lib/dns/message_test.go b/lib/dns/message_test.go index 5c6fc451..bd8ead34 100644 --- a/lib/dns/message_test.go +++ b/lib/dns/message_test.go @@ -2116,7 +2116,7 @@ func TestUnpackMessage_SVCB(t *testing.T) { msg, err = UnpackMessage(stream) if err != nil { - t.Fatal(logp, err) + t.Fatal(logp, name, err) } stream, err = json.MarshalIndent(&msg, ``, ` `) diff --git a/lib/dns/rdata_svcb.go b/lib/dns/rdata_svcb.go index e97eb078..474c7185 100644 --- a/lib/dns/rdata_svcb.go +++ b/lib/dns/rdata_svcb.go @@ -735,6 +735,7 @@ func (svcb *RDataSVCB) unpackParamIpv4hint(packet []byte) ([]byte, error) { var ip = net.IP(packet[0:4]) packet = packet[4:] listValue = append(listValue, ip.String()) + n-- } svcb.Params[svcbKeyIDIpv4hint] = listValue diff --git a/lib/dns/testdata/message/UnpackMessage_SVCB_test.txt b/lib/dns/testdata/message/UnpackMessage_SVCB_test.txt index e3237f7a..8454905f 100644 --- a/lib/dns/testdata/message/UnpackMessage_SVCB_test.txt +++ b/lib/dns/testdata/message/UnpackMessage_SVCB_test.txt @@ -356,6 +356,9 @@ The test input taken from output of parsing SVCB record from zone file. "1": [ "h2", "h3-19" + ], + "4": [ + "192.0.2.1" ] }, "TargetName": "foo.example.org",