Hi,
DNS resolution using libresolv (res_nquery) fails in 15.4 when connected to VPN. The same is working fine for 15.3 and lower and this happens for all the domains. The method returns -1 and res->res_h_errno is set to 2.
In wireshark we can see that the DNS request is sent and server also returns the response successfully.
The same works fine if we use TCP instead of UDP by setting the following option
res->options |= RES_USEVC;
There are a couple of ways to slice this. First, if you have widely deployed product that’s failing after a software update, it’s worthwhile filing a compatibility bug about that. Apple strives to avoid breaking widely deployed products.
If you do file a bug, please post the bug number, just for the record.
Having said that, res_nquery
is very much a compatibility API on our platforms and I strongly recommend against using it in production code. As to what you should do, that depends. There’s basic advice in TN3151 Choosing the right networking API, but if you want to go into more depth I’m happy to do that here. You just have to answer one question: What are you using res_nquery
for?
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"