GetHostByName timeout
-
- Posts: 19
- Joined: Fri Dec 19, 2014 3:07 pm
GetHostByName timeout
I'm getting a GetHostByName timeout when trying to resolve a hostname from an internal DNS server, but it works fine with OpenDNS. However, other devices, such as PCs and laptops, are able resolve a hostname from the internal DNS server on the same ethernet port. Any insights or ideas on how to troubleshoot this?
Re: GetHostByName timeout
I would get a wireshark trace and compare the one that works with the one that does not.
Re: GetHostByName timeout
Obvious question is does the netburner know the address of this server?
Static or DHCP addresses?
Is the internal DNS server on the same subnet? If not does the netburner have a geateway?
What are you using for a timeout value?
(Its in ticks not seconds)
Do you have the IPAddresses orders to the call correct?
IE
GetHostByName( "nameyourlookingfor.com",&addess_to_put_result_into,ip_addresses_of_your_local_server, TICKS_PER_SECOND *10);
Paul
Static or DHCP addresses?
Is the internal DNS server on the same subnet? If not does the netburner have a geateway?
What are you using for a timeout value?
(Its in ticks not seconds)
Do you have the IPAddresses orders to the call correct?
IE
GetHostByName( "nameyourlookingfor.com",&addess_to_put_result_into,ip_addresses_of_your_local_server, TICKS_PER_SECOND *10);
Paul
-
- Posts: 19
- Joined: Fri Dec 19, 2014 3:07 pm
Re: GetHostByName timeout
I've finally tracked down the issue. GetHostByName sets both the destination and src port to 53 in the UDP packet. While this is fine in the general case, many organizations with stringent internal policies may have problems with things using well known ports as a listening port or return port.
Once I modified nburn/system/dns.cpp to use a source port outside of the range, such as port 53380, everything worked fine. I've observed that every other DNS client I've used uses a source port outside of the well-known port range as the source port as well. In my opinion, the source port should be configurable.
Thanks.
Once I modified nburn/system/dns.cpp to use a source port outside of the range, such as port 53380, everything worked fine. I've observed that every other DNS client I've used uses a source port outside of the well-known port range as the source port as well. In my opinion, the source port should be configurable.
Thanks.
Re: GetHostByName timeout
Amusingly, we discovered this issue Monday. Sorry that this has given you a problem.
Dan Ciliske
Project Engineer
Netburner, Inc
Project Engineer
Netburner, Inc
-
- Posts: 19
- Joined: Fri Dec 19, 2014 3:07 pm
Re: GetHostByName timeout
Glad the issue is being addressed. I've patched dns.cpp in the meantime. I'm sure you're already aware, since SetTimeNTPFromPool() calls GetHostByName(), it prevents it from working properly as well.
Thanks again.
Thanks again.