diff options
author | Orion Poplawski <orion@nwra.com> | 2017-10-25 15:30:10 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2017-10-25 15:30:10 -0400 |
commit | 5781bae4276348e4331cd3824c161c231e507f01 (patch) | |
tree | 0f57650a6f76564fcd212ec010e1691832a75710 | |
parent | 3d569cb3bedc448e52de831bf891e8c0729fa757 (diff) | |
download | nfs-utils-5781bae4276348e4331cd3824c161c231e507f01.tar.gz nfs-utils-5781bae4276348e4331cd3824c161c231e507f01.tar.xz nfs-utils-5781bae4276348e4331cd3824c161c231e507f01.zip |
sm-notify needs to call res_init() before each try
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=625531
Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r-- | utils/statd/sm-notify.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/statd/sm-notify.c b/utils/statd/sm-notify.c index d216ddb..d961dc0 100644 --- a/utils/statd/sm-notify.c +++ b/utils/statd/sm-notify.c @@ -28,6 +28,9 @@ #include <netdb.h> #include <errno.h> #include <grp.h> +#include <netinet/in.h> +#include <arpa/nameser.h> +#include <resolv.h> #include "conffile.h" #include "sockaddr.h" @@ -90,6 +93,7 @@ smn_lookup(const char *name) }; int error; + res_init(); error = getaddrinfo(name, NULL, &hint, &ai); if (error != 0) { xlog(D_GENERAL, "getaddrinfo(3): %s", gai_strerror(error)); |