"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "parse_test.go" between
dns-1.1.48.tar.gz and dns-1.1.49.tar.gz

About: GO DNS implements a DNS library in Go.

parse_test.go  (dns-1.1.48):parse_test.go  (dns-1.1.49)
skipping to change at line 1653 skipping to change at line 1653
`example.com. 3600 IN SVCB 0 no-default-alpn`: `example.com. 3 600 IN SVCB 0 no-default-alpn.`, `example.com. 3600 IN SVCB 0 no-default-alpn`: `example.com. 3 600 IN SVCB 0 no-default-alpn.`,
// From the specification // From the specification
`example.com. HTTPS 0 foo.example.com.`: `example.com. 3 600 IN HTTPS 0 foo.example.com.`, `example.com. HTTPS 0 foo.example.com.`: `example.com. 3 600 IN HTTPS 0 foo.example.com.`,
`example.com. SVCB 1 .`: `example.com. 3600 IN S VCB 1 .`, `example.com. SVCB 1 .`: `example.com. 3600 IN S VCB 1 .`,
`example.com. SVCB 16 foo.example.com. port=53`: `example.com . 3600 IN SVCB 16 foo.example.com. port="53"`, `example.com. SVCB 16 foo.example.com. port=53`: `example.com . 3600 IN SVCB 16 foo.example.com. port="53"`,
`example.com. SVCB 1 foo.example.com. key667=hello`: `example .com. 3600 IN SVCB 1 foo.example.com. key667="hello"`, `example.com. SVCB 1 foo.example.com. key667=hello`: `example .com. 3600 IN SVCB 1 foo.example.com. key667="hello"`,
`example.com. SVCB 1 foo.example.com. key667="hello\210qoo"`: `example.com. 3600 IN SVCB 1 foo.example.com. key667="hello\210qoo"` , `example.com. SVCB 1 foo.example.com. key667="hello\210qoo"`: `example.com. 3600 IN SVCB 1 foo.example.com. key667="hello\210qoo"` ,
`example.com. SVCB 1 foo.example.com. ipv6hint="2001:db8::1,2 001:db8::53:1"`: `example.com. 3600 IN SVCB 1 foo.example.com. ipv6hi nt="2001:db8::1,2001:db8::53:1"`, `example.com. SVCB 1 foo.example.com. ipv6hint="2001:db8::1,2 001:db8::53:1"`: `example.com. 3600 IN SVCB 1 foo.example.com. ipv6hi nt="2001:db8::1,2001:db8::53:1"`,
`example.com. SVCB 1 example.com. ipv6hint="2001:db8::198.51. 100.100"`: `example.com. 3600 IN SVCB 1 example.com. ipv6hint=" 2001:db8::c633:6464"`, `example.com. SVCB 1 example.com. ipv6hint="2001:db8::198.51. 100.100"`: `example.com. 3600 IN SVCB 1 example.com. ipv6hint=" 2001:db8::c633:6464"`,
`example.com. SVCB 16 foo.example.org. alpn=h2,h3-19 mandator y=ipv4hint,alpn ipv4hint=192.0.2.1`: `example.com. 3600 IN SVCB 1 6 foo.example.org. alpn="h2,h3-19" mandatory="ipv4hint,alpn" ipv4hint="192.0.2.1 "`, `example.com. SVCB 16 foo.example.org. alpn=h2,h3-19 mandator y=ipv4hint,alpn ipv4hint=192.0.2.1`: `example.com. 3600 IN SVCB 1 6 foo.example.org. alpn="h2,h3-19" mandatory="ipv4hint,alpn" ipv4hint="192.0.2.1 "`,
`example.com. SVCB 16 foo.example.org. alpn="f\\\\oo\\,bar,h2 `example.com. SVCB 16 foo.example.org. alpn="f\\\\oo\\,bar,h2
"`: `example.com. 3600 IN SVCB 16 foo.example.org. alpn="f\\\\oo "`: `example.com. 3600 IN SVCB 16 foo.example.org. alpn="f\\\092
\\,bar,h2"`, oo\\\044bar,h2"`,
`example.com. SVCB 16 foo.example.org. alpn=f\\\092oo\092,bar `example.com. SVCB 16 foo.example.org. alpn=f\\\092oo\092,bar
,h2`: `example.com. 3600 IN SVCB 16 foo.example.org. alpn="f\\\092 ,h2`: `example.com. 3600 IN SVCB 16 foo.example.org. alpn="f\\\092
oo\092,bar,h2"`, oo\\\044bar,h2"`,
// From draft-ietf-add-ddr-06
`_dns.example.net. SVCB 1 example.net. alpn=h2 dohpath=/dns-query
{?dns}`: `_dns.example.net. 3600 IN SVCB 1 example.net. alpn="h2"
dohpath="/dns-query{?dns}"`,
`_dns.example.net. SVCB 1 example.net. alpn=h2 dohpath=/dns\045qu
ery{\?dns}`: `_dns.example.net. 3600 IN SVCB 1 example.net. al
pn="h2" dohpath="/dns-query{?dns}"`,
} }
for s, o := range svcbs { for s, o := range svcbs {
rr, err := NewRR(s) rr, err := NewRR(s)
if err != nil { if err != nil {
t.Error("failed to parse RR: ", err) t.Error("failed to parse RR: ", err)
continue continue
} }
if rr.String() != o { if rr.String() != o {
t.Errorf("`%s' should be equal to\n`%s', but is `%s'" , s, o, rr.String()) t.Errorf("`%s' should be equal to\n`%s', but is `%s'" , s, o, rr.String())
} }
skipping to change at line 1705 skipping to change at line 1708
`1 . ipv6hint=1:1:1:1`, // not ipv6 `1 . ipv6hint=1:1:1:1`, // not ipv6
`1 . ipv6hint=a`, // not ipv6 `1 . ipv6hint=a`, // not ipv6
`1 . ipv6hint=`, // empty ipv6 `1 . ipv6hint=`, // empty ipv6
`1 . ipv4hint=1.1.1.1.1`, // not ipv4 `1 . ipv4hint=1.1.1.1.1`, // not ipv4
`1 . ipv4hint=::fc`, // not ipv4 `1 . ipv4hint=::fc`, // not ipv4
`1 . ipv4hint=..11`, // not ipv4 `1 . ipv4hint=..11`, // not ipv4
`1 . ipv4hint=a`, // not ipv4 `1 . ipv4hint=a`, // not ipv4
`1 . ipv4hint=`, // empty ipv4 `1 . ipv4hint=`, // empty ipv4
`1 . port=`, // empty port `1 . port=`, // empty port
`1 . echconfig=YUd`, // bad base64 `1 . echconfig=YUd`, // bad base64
`1 . alpn=h\`, // unterminated escape
`1 . alpn=h2\\.h3`, // comma-separated list with bad chara
cter
`1 . alpn=h2,,h3`, // empty protocol identifier
`1 . alpn=h3,`, // final protocol identifier empty
} }
for _, o := range evils { for _, o := range evils {
_, err := NewRR(header + o) _, err := NewRR(header + o)
if err == nil { if err == nil {
t.Error("failed to reject invalid RR: ", header+o) t.Error("failed to reject invalid RR: ", header+o)
continue continue
} }
} }
} }
 End of changes. 2 change blocks. 
6 lines changed or deleted 18 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)