[systemd-devel] getaddrinfo() API with systemd
Nanda Kumar
nandakumar.nie at gmail.com
Fri Apr 24 22:35:40 PDT 2015
Hi,
I am facing problem while querying DNS using getaddrinfo() API under a
process initiated by systemd. Despite having nameserver entry in
/etc/resolv.conf, the query fails to resolve. After few system call traces,
it is found that the problem is due to systemd resolution. It seems like,
for a process inited by systemd, the getaddrinfo() DNS query routed via
systemd while in stand alone mode (i.e. spawned by shell), the query
happens normally. I changed the /etc/systemd/resolved.conf to add my DNS
address and restarted systemd-resolved. Now the DNS query works properly.
Is there anyway to bypass systemd for getaddrinfo() [ex: passing extra
flags to hints], and get the work done in usual way?
In my case /etc/resolv.conf is softlink to runtime resolved.conf of
systemd. Will unlinking and keeping the /etc/resolv.conf independent will
solve the solution?
Regards,
Nandakumar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150425/82b6fc26/attachment.html>
More information about the systemd-devel
mailing list