[reSIProcate] [PATCH] (Mac platform) Getting DNS servers from system and no network connectivity assert
Van c. Nguyen
vann at counterpath.com
Thu Jan 25 20:58:36 CST 2007
Hi,
This patch, created by our Mac folks, of 'ares_init.c' only applies to Mac
implementations. I'll check it in later tomorrow, but thought I'd give those
interested a heads-up to review.
It solves 2 problems:
1) an assert in open_udp_socket which is as good as a crash on a Mac
2) it populates the DNS servers data structures, channel->servers[x], using
information from the host system. Much like the Windows' path.
Details:
----------
1)
The vague scenario:
i) compile stack with 'USE_IPV6'
ii) no network connectivity (unplug net cable)
iii) have the stack/ares do a dns query
ares will assert in 'open_udp_socket' of ares_process.c:
static int open_udp_socket(ares_channel channel, struct server_state
*server)
...
assert(server->family == AF_INET || server->family == AF_INET6);
This is due to channel->servers[x].family not being initialized at all along
the no-network path.
2) see 'init_by_defaults_systemconfiguration'
Van.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ares_init.c.diff
Type: application/octet-stream
Size: 2823 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20070125/26b25282/attachment.obj>
More information about the resiprocate-devel
mailing list