Hi,

The symptom is sa-update getting a NOTIMP (not implemented) when it tries to 
get TXT DNS records (meaning it fails to get any of the information it needs 
to do the update).

The diagnosis is that the DNS server in my (old) Alcatel router, while quite 
happy to return TXT records with an ANY query, returns NOTIMP when 
specifically asked for TXT records.

The solution is the attached patch which does an ANY query instead of TXT and 
checks each record is TXT before processing it. The patch is against my 
installed debian testing version (3.1.7) but I notice that no one has changed 
the behaviour in the trunk.

Ok, so it's a work-around for broken DNS servers and not a bug fix. But it 
won't affect existing users and will solve the problem for people in the same 
situation as me.

Cheers,
Mike.
*** /usr/bin/sa-update	2007-02-15 05:28:45.000000000 +0000
--- sa-update	2007-02-22 00:28:54.000000000 +0000
***************
*** 941,951 ****
  sub do_txt_query {
    my($query) = shift;
  
!   my $RR = $res->query($query, 'TXT');
    my $result = '';
  
    if ($RR) {
      foreach my $rr ($RR->answer) {
        my $text = $rr->rdatastr;
        $text =~ /^"(.*)"$/;
        if (length $result) {
--- 941,952 ----
  sub do_txt_query {
    my($query) = shift;
  
!   my $RR = $res->query($query, 'ANY');
    my $result = '';
  
    if ($RR) {
      foreach my $rr ($RR->answer) {
+       next unless uc($rr->type) eq 'TXT';
        my $text = $rr->rdatastr;
        $text =~ /^"(.*)"$/;
        if (length $result) {

Reply via email to