Re: AXFR from Bind oddities
DAve <[email protected]> Mon, 12 Apr 2010 11:36:35 -0400
| Newsgroups | gmane.network.djbdns |
|---|---|
| Message-ID | <[email protected]> |
Chris Pugh wrote: > Have you ched here.. > > http://cr.yp.to/djbdns/tinydns-data.html > > ( especially the 'uncommon data' lines section ) Yes. The issue is not my creating the data file and using the octal values. The problem is axfr-get placing odd characters within the data. I do not know if those are coming from axfr-get or from the data sent by the target Bind server. I suspect the target bind server as axfr-get has no issues with another client's axfr data, but.... using dig axfr works just fine. The record as written by axfr-get :djgusa.com:16:Zv\075spf1\040include\072spf.messaging.microsoft.com\040include\072cmail1.com\040include\072sid.listrak.co m\040-all:86400 The record as written by dig axfr djgusa.com. 86400 IN TXT "v=spf1 include:spf.messaging.microsoft.com include:cmail1.com include:sid.listrak.com -all" The record from axfr-get shows (ignore the dbl quotes) "v=spf1" as "v\075spf1", that is correct. So where does the "Z" character come from? It is not in the output of dig axfr. > > and also here, > > http://cr.yp.to/djbdns/axfr-notes.html > > ? > > jooi, iima, why are you using axfr-dns? > > As djb jimself states, there are better methods. the nost obvious > being rsync ( over SSH ). The server I am querying is a Bind server, I cannot use rsync as they have no data file for me to pick up, only zones files. I do not have faith that the zone files will be placed/named consistently. Using AXFR guarantees that what the client sees from their Bind server is all I am picking up for my server. DAve > > Regards, > > > Chris. > > > On 12 April 2010 14:12, DAve <[email protected]> wrote: >> Good morning, >> >> We have a client that we routinely AXFR zone from. They use Bind inside >> their network and we AXFR zone when they send us a notify, load the zone >> into VegaDNS, and then populate our tinydns data files. >> >> We are running into a issue with TXT records where extra characters >> appear in the records. The client is editing their zone files with VI >> and their Bind server answers with a correct record. When we do an AXFR >> though, the data file created by axfr-get has odd characters in the TXT >> file line. This is only happening with one client. >> >> Example, >> :djgusa.com:16:Zv\075spf1 <snip> >> Why is the "Z" in "16:Zv"? >> >> :djgusa.com:16:\136spf2.0 <snip> >> Why is the "\136" in "16:\136spf2"? >> >> Currently I am filtering out the oddities with a preprocessor script but >> it is becoming a chore as the characters do not remain the same, and do >> not always appear in every TXT record. >> >> This is the current list of filters I have in place, and it's growing. >> >> }elsif($id eq ":"){ >> if($debug){print "'$data[0]' '$data[1]' '$data[2]' '$id' '$line'\n";} >> if($data[2] eq "16"){ >> $data[3] =~ s/Nv\\075/v=/; >> $data[3] =~ s/\\040/ /g; >> $data[3] =~ s/\\042//g; >> $data[3] =~ s/\\073//g; >> $data[3] =~ s/\\072/:/g; >> $data[3] =~ s/\\176/~/g; >> $data[3] =~ s/\\057/\//g; >> $data[3] =~ s/\\015//g; >> $data[3] =~ s/\\222//g; >> $data[3] =~ s/\\173//g; >> $data[3] =~ s/\\174//g; >> $data[3] =~ s/\\075/=/g; >> $data[3] =~ s/\\037v=/v=/g; >> $data[3] =~ s/\\3v=/v=/g; >> $data[3] =~ s/\\211v=/v=/g; >> $data[3] =~ s/\\213v=/v=/g; >> $data[3] =~ s/\\227v=/v=/g; >> $data[3] =~ s/\\243v=/v=/g; >> $data[3] =~ s/\\247v=/v=/g; >> $data[3] =~ s/\\247spf/spf/g; >> $data[3] =~ s/\\136spf2/spf2/g; >> $data[3] =~ s/\\Zv=spf1/v=spf1/g; >> $data[3] =~ s/\\210k=/k=/g; >> $data[3] =~ s/\\011t=/t=/g; >> $host = $data[1]; >> $type = 'T'; >> $val = $data[3]; >> $distance = ''; >> $ttl = $data[4]; >> >> I am open to any suggestions as to where these characters are coming >> from, and how to stop them from getting into the data record. >> >> Thanks, >> >> DAve >> >> -- >> "Posterity, you will know how much it cost the present generation to >> preserve your freedom. I hope you will make good use of it. If you >> do not, I shall repent in heaven that ever I took half the pains to >> preserve it." John Adams >> >> http://appleseedinfo.org >> >> > > -- "Posterity, you will know how much it cost the present generation to preserve your freedom. I hope you will make good use of it. If you do not, I shall repent in heaven that ever I took half the pains to preserve it." John Adams http://appleseedinfo.org