From: Steve Dickson <steved@redhat.com>
To: Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: [PATCH] sm-notify needs to call res_init() before each try
Date: Thu, 12 Oct 2017 11:06:56 -0400 [thread overview]
Message-ID: <20171012150656.5722-1-steved@redhat.com> (raw)
From: Orion Poplawski <orion@nwra.com>
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=625531
Signed-off-by: Steve Dickson <steved@redhat.com>
---
utils/statd/sm-notify.c | 4 ++++
1 file changed, 4 insertions(+)
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));
--
2.13.6
next reply other threads:[~2017-10-12 15:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-12 15:06 Steve Dickson [this message]
2017-10-25 19:31 ` [PATCH] sm-notify needs to call res_init() before each try Steve Dickson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171012150656.5722-1-steved@redhat.com \
--to=steved@redhat.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).