summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch')
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch
new file mode 100644
index 0000000..d8f8181
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch
@@ -0,0 +1,36 @@
1Fixes errors like
2sm-notify[1070]: DNS resolution of a.b.c.d..com failed; retrying later
3This error will occur anytime sm-notify is run before the network if fully up,
4which is happening more and more with parallel startup systems.
5The res_init() call is simple, safe, quick, and a patch to use it should be
6able to go upstream. Presumably the whole reason sm-notify tries several
7times is to wait for possible changes to the network configuration, but without
8calling res_init() it will never be aware of those changes
9
10Backported drom Fedora
11
12Upstream-Status: Pending
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14
15
16diff -up nfs-utils-1.2.3/utils/statd/sm-notify.c.orig nfs-utils-1.2.3/utils/statd/sm-notify.c
17--- nfs-utils-1.2.3/utils/statd/sm-notify.c.orig 2010-09-28 08:24:16.000000000 -0400
18+++ nfs-utils-1.2.3/utils/statd/sm-notify.c 2010-10-15 16:44:43.487119601 -0400
19@@ -28,6 +28,9 @@
20 #include <netdb.h>
21 #include <errno.h>
22 #include <grp.h>
23+#include <netinet/in.h>
24+#include <arpa/nameser.h>
25+#include <resolv.h>
26
27 #include "sockaddr.h"
28 #include "xlog.h"
29@@ -84,6 +87,7 @@ smn_lookup(const char *name)
30 };
31 int error;
32
33+ res_init();
34 error = getaddrinfo(name, NULL, &hint, &ai);
35 if (error != 0) {
36 xlog(D_GENERAL, "getaddrinfo(3): %s", gai_strerror(error));