Fix HIP parsing
This commit is contained in:
parent
1897a2a983
commit
3861fcbbb2
|
@ -7,16 +7,15 @@ func TestFuzzString(t *testing.T) {
|
|||
";a ", ";a<><61><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
" NSAP O ", " NSAP N ",
|
||||
" TYPE4 TYPE6a789a3bc0045c8a5fb42c7d1bd998f5444 IN 9579b47d46817afbd17273e6",
|
||||
// " HIP 0 e e @ . .",
|
||||
}
|
||||
for i, tc := range testcases {
|
||||
rr, err := NewRR(tc)
|
||||
if err == nil {
|
||||
// rr can still be nil because we can (for instance) just parse a comment
|
||||
// rr can be nil because we can (for instance) just parse a comment
|
||||
if rr == nil {
|
||||
continue
|
||||
}
|
||||
t.Fatalf("parsed mailformed RR %d: %s", i, rr.String)
|
||||
t.Fatalf("parsed mailformed RR %d: %s", i, rr.String())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1054,6 +1054,7 @@ func setHIP(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) {
|
|||
case zString:
|
||||
if l.token == "@" {
|
||||
xs = append(xs, o)
|
||||
l = <-c
|
||||
continue
|
||||
}
|
||||
_, ok := IsDomainName(l.token)
|
||||
|
|
Loading…
Reference in New Issue