[reSIProcate] DnsResults and numeric IP addresses
- From: Alan Hawrylyshen <alan@xxxxxxxxxx>
- Date: Mon, 6 Sep 2004 10:28:34 -0600
All;
I've been messing around with DnsResults (testDns) with a system that
has no resolver.
I'm seeing some behaviour that makes me wonder:
When the hostname portion is a numeric address (be it v4 or v6) we
return immediately (good) and set the available() state to Available.
I'm not so sure that this is the correct thing to do. Wouldn't we want
to set it to Finished in the case where there is only a single entry in
the results list.
We aren't waiting on further results....
To see what I mean, compile testDns and run it thusly:
./testDns --log-type=cout --log-level=STACK sip:10.0.0.1:5060
Example output:
EBUG | 1094487950 | testDns | RESIP:DNS |
../../resiprocate/DnsResult.cxx:116 | DnsResult::lookup
sip:10.0.0.1:5060
DEBUG | 1094487950 | testDns | RESIP:DNS |
../../resiprocate/DnsResult.cxx:166 | Numeric result so return
immediately: [ V4 10.0.0.1:5060 UDP connectionId=0 ]
Waiting for 10.0.0.1 --> [[ V4 10.0.0.1:5060 UDP connectionId=0
]][1]/(Available)
Waiting for 10.0.0.1 --> [[ V4 10.0.0.1:5060 UDP connectionId=0
]][1]/(Available)
Waiting for 10.0.0.1 --> [[ V4 10.0.0.1:5060 UDP connectionId=0
]][1]/(Available)
...
Those last line just keep spinning.
If I use 'localhost' as an example, the results are 'Finished'....
Thoughts? Jason?
Alan
a l a n a t j a s o m i d o t c o m