Changes between Initial Version and Version 1 of Ticket #12195, comment 1


Ignore:
Timestamp:
Jul 6, 2015, 9:34:50 PM (9 years ago)
Author:
jua

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12195, comment 1

    initial v1  
    1 The DNS network settings use the `__res` API which, according to NetBSD [0], has been out of favour for a long time. In hrev49371 I switched our netresolv to use the thread-safe version of the res functions, which are also used internally by getaddrinfo() and others (for further explanation see the commit message). It was necessary because the thread-unsafe version broke name resolution in the Services Kit (as soon as more than one request happened at the same time).
     1The DNS network settings use the global `__res` API which, according to [0], has been out of favour for a long time. In hrev49371 I switched our netresolv to use the thread-safe version of the res functions, which are also used internally by getaddrinfo() and others (for further explanation see the commit message). It was necessary because the thread-unsafe version broke name resolution in the Services Kit (as soon as more than one request happened at the same time).
    22
    33However, the thread-safe implementation doesn't support the old `__res_state()` API at all anymore, hence this bug. On the NetBSD problem report in [0] it is recommended to use a local `_res_state` via `res_ninit()` and `res_nclose()` instead. I'm not familiar with these APIs - maybe Axel can comment if that would be feasible?
     
    55Other options would be extending netresolv ourselves to allow using this (basically, providing a mix of NetBSD's thread-safe and thread-unsafe functions, not a good choice I think), or switching to a different implementation altogether.
    66
    7 [0] http://gnats.netbsd.org/46661
     7[0] http://gnats.netbsd.org/46661 (thanks to Diver for providing the link)