Resolve hosts by DNS name in separate threads so we can cancel them
authorTobias Brunner <tobias@strongswan.org>
Tue, 16 Oct 2012 08:57:02 +0000 (10:57 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 18 Oct 2012 08:57:55 +0000 (10:57 +0200)
commit292d8f41c3b39b8f8c6bede26de742c90120bf67
treef79a78167402d5254c4557b6e18f97d2dc5457ca
parent272ce5b5804fcaa4b9ca4b3c1f1f2e313cd22da3
Resolve hosts by DNS name in separate threads so we can cancel them

getaddrinfo(3) may block a long time so proper termination of the daemon may
block if DNS servers are not reachable.

getaddrinfo(3) is an optional cancellation point in posix threads so it
might still block a shutdown but at least on Android (with the signal based
pthread_cancel implementation) it works, on Linux starter will kill charon
anyway after a while.
src/libcharon/daemon.c
src/libstrongswan/Android.mk
src/libstrongswan/Makefile.am
src/libstrongswan/host_resolver.c [new file with mode: 0644]
src/libstrongswan/host_resolver.h [new file with mode: 0644]
src/libstrongswan/library.c
src/libstrongswan/library.h
src/libstrongswan/utils/host.c