Re: [MaraDNS list] read slashcommand causes Host name must be at beginning of a line
Sam Trenholme <[email protected]> Sat, 8 Oct 2011 14:21:43 -0500
| Newsgroups | gmane.network.dns.maradns.general |
|---|---|
| Message-ID | <CA+7SMPuYf-Myogic2B9mVcdJD_fFOXN6muRPxjuZVpXvGfP6_g@mail.gmail.com> |
Karim, I have been able to reproduce the issue on my internal testing setup. I have plans today so I will not be able to continue looking at the bug right now, but I hope to have time in the next day or two to look at it. - Sam 2011/10/8 Karim Malhas <[email protected]>: > Hello Sam, > > > That's great. > I minified the testcase to this: > > zonefile 'db' > ------------------ > /read include ~ > ------------------ > > include > ------------------ > a. 10.0.0.1 > ------------------ > > From playing around with gdb and maradns compiled with debugging this is > what I think is happening: > > On Csv2_parse.c:1591 before csv2_get_filename is called stream->context is > '/read ' > On Csv2_parse.c:1529 before csv2_push_file is called stream->context is > '/read include ' and some trailing 0s > > Then the loop repeats and > On Csv2_parse.c:1392 csv2_get_1st is called which runs to Csv2_parse.c:511 > where the error is thrown. > stream->context is '/read include a\000\000\000' here. > > So it looks like the '~' goes missing. > > I have attached the gdb session which includes a backtrace. > > Note however, that my C-fu is weak, and I might be totally off track. > > Regards, > Karim > > > >> /ttl 300 ~ >>> /origin example.com. ~ >>> % NS a.ns.% ~ >>> >>> >>> /read db.testing.generated ~ >>> >>> # TODO: don't actually want CNAMES here - find out how use aliases >>> instead >>> packages.% CNAME hatch.% ~ >>> ci.% CNAME hatch.% ~ >>> install.% A 192.168.200.2 ~ >>> ------------------------------------------- >>> >>> /etc/maradns/db.testing.generated >>> ------------------------------------------- >>> hatch.% A 192.168.200.141 ~ >>> vince.% A 192.168.200.142 ~ >>> betsy.% A 192.168.200.143 ~ >>> ------------------------------------------- >>> >>> The maradns error: >>> ------------------------------------------- >>> Oct 7 10:12:44 virtmaster maradns.etc_maradns_mararc: Processing zone >>> example.com. right now. >>> Oct 7 10:12:44 virtmaster maradns.etc_maradns_mararc: Filename: >>> db.testing >>> Oct 7 10:12:44 virtmaster maradns.etc_maradns_mararc: Error: Host name >>> must be at the beginning of a line >>> Oct 7 10:12:44 virtmaster maradns.etc_maradns_mararc: Error is on line >>> 6 >>> in file db.testing.generated >>> Oct 7 10:12:44 virtmaster maradns.etc_maradns_mararc: context of > error: >>> testing.generated h (closing this file) >>> Oct 7 10:12:44 virtmaster maradns.etc_maradns_mararc: BUG: Don't run >>> csv2_justread on a closed file! >>> Oct 7 10:12:44 virtmaster maradns.etc_maradns_mararc: BUG: Don't run >>> csv2_justread on a closed file! >>> Oct 7 10:12:44 virtmaster maradns.etc_maradns_mararc: Error: > Unexpected >>> character >>> Oct 7 10:12:44 virtmaster maradns.etc_maradns_mararc: Error is on line >>> 6 >>> in file db.testing.generated >>> Oct 7 10:12:44 virtmaster maradns.etc_maradns_mararc: context of > error: >>> testing.generated h (closing this file) >>> Oct 7 10:12:44 virtmaster maradns.etc_maradns_mararc: Error: Problem >>> getting hostname >>> Oct 7 10:12:44 virtmaster maradns.etc_maradns_mararc: Error is on line >>> 6 >>> in file db.testing.generated >>> Oct 7 10:12:44 virtmaster maradns.etc_maradns_mararc: context of > error: >>> testing.generated h (closing this file) >>> Oct 7 10:12:44 virtmaster maradns.etc_maradns_mararc: MaraDNS proudly >>> serves you 2 DNS records >>> Oct 7 10:12:44 virtmaster maradns.etc_maradns_mararc: Log: All RRs >>> have >>> been loaded >>> ------------------------------------------- >>> >>> /etc/maradns/mararc >>> ------------------------------------------- >>> csv2={} >>> csv2["example.com."] = "db.testing" >>> bind_address ="192.168.200.2" >>> chroot_dir="/etc/maradns" >>> maradns_uid=103 >>> maradns_gid=105 >>> maxprocs=96 >>> default_rrany_set=3 >>> max_chain=8 >>> max_ar_chain=1 >>> max_total=20 >>> verbose_level = 2 >>> hide_disclaimer= "YES" >>> ipv4_alias = {} >>> ipv4_alias["icann"] = >>> > "198.41.0.4,192.228.79.201,192.33.4.12,128.8.10.90,192.203.230.10,192.5.5.241,192.112.36.4,128.63.2.53,192.36.148.17,192.58.128.30,193.0.14.129,199.7.83.42,202.12.27.33" >>> recursive_acl = "0.0.0.0" >>> ------------------------------------------- >>> >