reload /etc/resolv.conf in SIGALRM handler
This commit is contained in:
parent
132bdb77a0
commit
e76df30cb2
2 changed files with 13 additions and 1 deletions
|
@ -163,7 +163,7 @@ AC_CHECK_HEADERS([stdbool.h syslog.h sys/file.h sys/ioctl.h sys/mman.h sys/param
|
||||||
AC_CHECK_HEADERS([net/if.h net/if_types.h linux/if_tun.h net/if_tun.h net/tun/if_tun.h net/if_tap.h net/tap/if_tap.h net/ethernet.h net/if_arp.h netinet/in_systm.h netinet/in.h netinet/in6.h time.h netpacket/packet.h],
|
AC_CHECK_HEADERS([net/if.h net/if_types.h linux/if_tun.h net/if_tun.h net/tun/if_tun.h net/if_tap.h net/tap/if_tap.h net/ethernet.h net/if_arp.h netinet/in_systm.h netinet/in.h netinet/in6.h time.h netpacket/packet.h],
|
||||||
[], [], [#include "src/have.h"]
|
[], [], [#include "src/have.h"]
|
||||||
)
|
)
|
||||||
AC_CHECK_HEADERS([netinet/if_ether.h netinet/ip.h netinet/ip6.h],
|
AC_CHECK_HEADERS([netinet/if_ether.h netinet/ip.h netinet/ip6.h resolv.h],
|
||||||
[], [], [#include "src/have.h"]
|
[], [], [#include "src/have.h"]
|
||||||
)
|
)
|
||||||
AC_CHECK_HEADERS([netinet/tcp.h netinet/ip_icmp.h netinet/icmp6.h],
|
AC_CHECK_HEADERS([netinet/tcp.h netinet/ip_icmp.h netinet/icmp6.h],
|
||||||
|
@ -204,6 +204,11 @@ AC_CHECK_DECLS([freeaddrinfo, gai_strerror, getaddrinfo, getnameinfo],
|
||||||
[], [], [#include "src/have.h"]
|
[], [], [#include "src/have.h"]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
AC_CHECK_DECLS([res_init], [], [], [
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#include <resolv.h>
|
||||||
|
])
|
||||||
|
|
||||||
AC_CACHE_SAVE
|
AC_CACHE_SAVE
|
||||||
|
|
||||||
dnl These are defined in files in m4/
|
dnl These are defined in files in m4/
|
||||||
|
|
|
@ -36,6 +36,10 @@
|
||||||
#include "subnet.h"
|
#include "subnet.h"
|
||||||
#include "xalloc.h"
|
#include "xalloc.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_RESOLV_H
|
||||||
|
#include <resolv.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
int contradicting_add_edge = 0;
|
int contradicting_add_edge = 0;
|
||||||
int contradicting_del_edge = 0;
|
int contradicting_del_edge = 0;
|
||||||
static int sleeptime = 10;
|
static int sleeptime = 10;
|
||||||
|
@ -309,6 +313,9 @@ static void sighup_handler(void *data) {
|
||||||
|
|
||||||
static void sigalrm_handler(void *data) {
|
static void sigalrm_handler(void *data) {
|
||||||
logger(DEBUG_ALWAYS, LOG_NOTICE, "Got %s signal", strsignal(((signal_t *)data)->signum));
|
logger(DEBUG_ALWAYS, LOG_NOTICE, "Got %s signal", strsignal(((signal_t *)data)->signum));
|
||||||
|
#ifdef HAVE_DECL_RES_INIT
|
||||||
|
res_init();
|
||||||
|
#endif
|
||||||
retry();
|
retry();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue