« Return to Thread: Weird issues between host and dig

Re: Weird issues between host and dig

by Tyler Hall-3 :: Rate this Message:

Reply to Author | View in Thread

I answered my own question, it was the resolver.

Thanks.


On Thu, Jun 4, 2009 at 12:58 PM, Tyler Hall <tyler@...> wrote:
Hello -

I'm having a weird problem with wildcards and differences on outputs received between dig and host.

If i run dig, I get the correct answer, while host servfails.

Here are the two records in question:

mysql> select name,type,content from records where name like '%schulhausplate.ch%';
+------------------------------------------+-------+-----------------------------------------------------------------------------+
| name                                     | type  | content                                                                     |
+------------------------------------------+-------+-----------------------------------------------------------------------------+
| *.schulhausplate.ch                      | CNAME | schulhausplate.ch.                                                          |
| schulhausplate.ch                        | A     | 195.190.179.1                                                             |
+------------------------------------------+-------+-----------------------------------------------------------------------------+

I have the following set in pdns.conf;

wildcards=yes

Here is the sql query that is being ran when I do both dig and host;

45 Query       select content,ttl,prio,type,domain_id,name from records where name='asfasklfjahfkjhas.schulhausplate.ch'
45 Query       select content,ttl,prio,type,domain_id,name from records where type='SOA' and name='asfasklfjahfkjhas.schulhausplate.ch'
45 Query       select content,ttl,prio,type,domain_id,name from records where type='SOA' and name='schulhausplate.ch'
45 Query       select content,ttl,prio,type,domain_id,name from records where name='*.schulhausplate.ch'
45 Query       select content,ttl,prio,type,domain_id,name from records where name='schulhausplate.ch.'
45 Query       select content,ttl,prio,type,domain_id,name from records where type='SOA' and name='schulhausplate.ch.'
45 Query       select content,ttl,prio,type,domain_id,name from records where type='SOA' and name='ch.'

If I'm reading the pdns code correctly, if wildcards is enable it should also do a host is like sql statement, no?

$ dig asdf.schulhausplate.ch @ns5.us CNAME
asdf.schulhausplate.ch. 3600    IN      CNAME   schulhausplate.ch.

What is weird though is that pdns servfails according to tcpdump, but dig still responds correctly;

15:52:05.186041 IP 209.234.247.xx.36426 > 72.249.105.xx.domain:  15897+ CNAME? asdf.schulhausplate.ch. (40)
15:52:05.187325 IP 72.249.105.xx.domain > 209.234.247.xx.36426:  15897 ServFail- 1/0/0 CNAME[|domain]

Same behavior with host, except it doesn't resolve:

$ host -t CNAME asdf.schulhausplate.ch ns5.us
Host asdf.schulhausplate.ch not found: 2(SERVFAIL)

15:52:21.762398 IP 209.234.247.xx.56340 > 72.249.105.xx.domain:  48002+ CNAME? asdf.schulhausplate.ch. (40)
15:52:21.763337 IP 72.249.105.xx.domain > 209.234.247.xx.56340:  48002 ServFail- 1/0/0 CNAME[|domain]

Is this behavior because I don't have a recurser setup on the box?   It seems the domain still resolves, it just gives odd behavior with 'host'    Any advice you can give would help a lot.

Thanks.




_______________________________________________
Pdns-users mailing list
Pdns-users@...
http://mailman.powerdns.com/mailman/listinfo/pdns-users

 « Return to Thread: Weird issues between host and dig