[net-dns-users] Bug with large txt RR ?

Håkon Alstadheim hakon at alstadheim.priv.no
Tue Oct 6 14:55:21 UTC 2026


Hi all. New to the list, sorry if this has already been asked and 
answered, skimmed the archives, but I might have missed something. Note: 
I'm not showing the output here, some spam-filter refused to forward my 
initial attempt at this mail, trying without the dumps.

I'm getting txt RRs for euronext.com, looking for the v=spf1 record. I 
get a split record, shown as dumped from Dumper.
eg if you run:
--- shell input ---
# perl -MNet::DNS -MData::Dumper -e '
$host="euronext.com";
my @txt2 = rr("$host","txt");
foreach $rr (@txt2){
  if($rr->rdstring =~ m(^.?v=spf1)){
   print "dumping spf perl rr for euronext.com:\n";
   print Dumper(\$rr);
   print "\n--\n";
   print "========\n";
   print "txtdata:|" . $rr->txtdata . "|\n";
  }
}
'
--- shell input ends ---
When getting the text value by 'print $rr->rdstring' (not shown), the 
quoting is messed up at the 511th character. $rr-txtdata is likewise 
messed up, it splits at the problematic point "include:478860 
1.spf03.hu" has a space where there should be none. This I can work 
around, but it feels very untidy :).

Using dig, does not show the same problem, e.g.:
--- code ---
$ dig euronext.com txt | grep 'v=spf1'
--- /code ---

I'd love to provide a patch, but the decoding done in the perl module is 
beyond my ken. Help, anyone ?

---
Kind regards, Håkon Alstadheim


More information about the net-dns-users mailing list