[net-dns-users] Bug with large txt RR ?
Håkon Alstadheim
hakon at alstadheim.priv.no
Tue Oct 6 20:11:12 UTC 2026
Den 06.10.2026 18:13, skrev Doug Barton via net-dns-users:
> You're incorrect about what is coming from dig:
> [snip]
They differ. The pieces look the same at first glance, but Net::DNS
messes up when glueing back together. Take all the pieces , removing
anything outside double-quotes.
dig gives you include:4788601.spf03.hu,
^ no space
Net::DNS gives you include:478860 1.spf03.hu
^space
>
> On 2026-10-06 10:55 AM, Håkon Alstadheim via net-dns-users wrote:
>> 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
>> _______________________________________________
>> net-dns-users mailing list
>> net-dns-users at lists.nlnetlabs.nl
>> https://lists.nlnetlabs.nl/mailman/listinfo/net-dns-users
>
> _______________________________________________
> net-dns-users mailing list
> net-dns-users at lists.nlnetlabs.nl
> https://lists.nlnetlabs.nl/mailman/listinfo/net-dns-users
More information about the net-dns-users
mailing list