[net-dns-users] Bug with large txt RR ?
Doug Barton
dougb at dougbarton.us
Tue Oct 6 23:38:16 UTC 2026
But that's not what you said. Now you're taking dig's output, then
post-processing by hand. If that's your standard, then apply it to the
Net::DNS output as well.
There is no question that learning how to assemble TXT answers that
exceed 255 chars is challenging. But don't blame the tools because it's
something you haven't mastered yet.
Or put a different way, there is no bug in the way that Net::DNS is
handling this response.
Good luck,
Doug
On 2026-10-06 4:11 PM, Håkon Alstadheim via net-dns-users wrote:
>
> 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
> _______________________________________________
> 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