Permalink
Browse files

Fix rfc3597 comment parsing

Fixes #147
  • Loading branch information...
blblack committed Nov 13, 2017
1 parent d02feaf commit 1727ad1abb921c81a4640870ae293da934190a57
Showing with 5 additions and 5 deletions.
  1. +2 −2 src/zscan_rfc1035.rl
  2. +3 −3 t/003complex/etc/zones/example.com
View
@@ -590,8 +590,8 @@ static void close_paren(zscan_t* z) {
naptr_rdata = uval %set_uv_1 ws uval %set_uv_2 ws naptr_txt ws dname_rhs;
rfc3597_octet = ([0-9A-Fa-f]{2}) >token_start %rfc3597_octet;
rfc3597_rdata = uval %set_uv_1 ws '\\' '#' ws uval %rfc3597_data_setup
(ws rfc3597_octet+ $1 %0)* $1 %0;
rfc3597_rdata = uval %set_uv_1 ws '\\' '#' ws uval %rfc3597_data_setup ws
(rfc3597_octet+ ws?)**;
# The left half of a resource record, which for our purposes here
# is the optional domainname and/or the optional ttl and/or the
@@ -230,9 +230,9 @@ max-naptr2 NAPTR 65535 65535 bcdefghijklmnopqrtvwxyz0123456789 A0123456789012345
; RFC3597 encoding of a pair of made-up 31337 rrtypes and a pair
; of SSHFP RRs using 20-byte SHA-1 fingerprints
rfc3597 TYPE31337 \# 10 0123456789ABCDEF0123
rfc3597 TYPE31337 \# 10 3210FEDCBA 9876543210
rfc3597 TYPE44 \# 22 01 01 012345 6789ABCDEF0123456789ABCDEF01234567
rfc3597 TYPE44 \# 22 02 01 0123456789ABCDEF0123456789AB CDEF01234567
rfc3597 TYPE31337 \# 10 3210FEDCBA 9876543210;close comment
rfc3597 TYPE44 \# 22 01 01 012345 6789ABCDEF0123456789ABCDEF01234567 ; spaced comment
rfc3597 TYPE44 \# 22 02 01 0123456789ABCDEF0123456789AB CDEF01234567 ; tabbed comment
; mixed-case zonefile input should get normalized
MiXeD MX 0 MaXTTL

0 comments on commit 1727ad1

Please sign in to comment.