I am using curl_easy_setopt(CURLOPT_INTERFACE, "if!something") to force transfers to use a particular interface but this doesn't make DNS requests use that interface.
I think most users would expect use of CURLOPT_INTERFACE to affect all network traffic generated by the transfer including DNS requests.
If c-ares is in use, this is actually easy to implement. With the attached patch, when using CURLOPT_INTERFACE, DNS requests are also bound to the specified interface. If c-ares is not in use or if the c-ares version is too old to support this, the behaviour is the same as it is now. I could have made it fail with CURLE_NOT_BUILT_IN but I don't think that's a good idea.
merged in current git now!