EnergyMech

Forum | Features | Download | Addons | Help | #emech | Links | About | Contact

Versions | News Archive | Installing | Linking | Configuration | Commands | FAQ


The time is now Thursday, April 7th, 2022, 12:25pm

Create account ]   User/Pass   


Forum Index :: Bug Reports :: bug in async dns code :: Reply to this topic

Author
 
danger
Posted :: 12:27am, Sun, Feb 14, 2010     Subject :: bug in async dns code


Posts: 3
 
    I am using emech 3.0.99p3 on FreeBSD 7.x/amd64 compiled from source.
The mech refuses to resolve the hostnames correctly, even though I tried to configure async dns with:

dnsserver +xx.240.234.xxx
dnsserver +xx.240.232.xxx
dnsserver +xx.240.232.xxx
dnsroot root.zone

root.zone was downloaded from your site.

With DEBUG enabled, I can see messages like these:

(rawdns_get_ip) xxx.xxx.xxx -> 4.72.160.0
(init_rawdns) {5} dnssock is active
(rawdns) questions xx.240.234.xxx: uptime.energymech.net
(process_rawdns) packet from: 92.240.234.125 (12 bytes)
(parse_query) 4367581: flags = 33025 { 1000000010000001 1 QR 1 (Answer) RD }
dns->when 1266100571
dns->ip 0.0.0.0
dns->auth <NULL> : - (0)
dns->auth2 <NULL> : - (0)
dns->findauth 0
dns->id 30807
dns->cname <NULL>
dns->host uptime.energymech.net

For some reason, it resolves all the server hostnames to 4.72.160.0. With IP addresses and also with async dns disabled, the emech connects to IRC w/o any problems.

By the way, the src/function.c file needs #include <sys/param.h> to compile on FreeBSD.

 
danger
Posted :: 12:05pm, Sun, Feb 14, 2010


Posts: 3
 
    so, I have hunted down the problem. It is actually two different problems here, one of them is that the emech is unable to connect to IRC, which is because src/dns.c:rawdns_get_ip() is incomplete, it only works when a IP in dot-notation is set in the mech.conf. It actually doesn't do any resolving. So I have copied part of the src/socket.c:get_ip() function back to rawdns_get_ip() and emech is now able to connect to IRC.

Now, the other problem is probably somewhere in src/dns.c:rawdns() or src/dns.c:parse_query(), as uptime module is unable to resolve uptime.energymech.net as seen in my previous message.

 

Copyright © 2000-2005 Proton,  All rights reserved. Last edited August 16th, 2005.
HTML 4.01 CSS