2012-12-07 08:37:34 +00:00
|
|
|
From 2d14cdf412c753b9cf778f1c80bf116651e15816 Mon Sep 17 00:00:00 2001
|
|
|
|
From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
|
|
|
|
Date: Fri, 7 Dec 2012 01:28:31 +0900
|
|
|
|
Subject: [PATCH 1/5] ninfod: Use unsigned int for digest.
|
2012-12-06 08:25:21 +00:00
|
|
|
|
2012-12-07 08:37:34 +00:00
|
|
|
Fixes following warning:
|
|
|
|
| ninfod_name.c: In function 'nodeinfo_group':
|
|
|
|
| ninfod_name.c:270:2: warning: pointer targets in passing argument 1 of 'MD5_Final' differ in signedness [-Wpointer-sign]
|
|
|
|
| /usr/include/openssl/md5.h:113:5: note: expected 'unsigned char *' but argument is of type 'char *'
|
2012-12-06 08:25:21 +00:00
|
|
|
|
2012-12-07 08:37:34 +00:00
|
|
|
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
|
|
|
|
---
|
|
|
|
ninfod/ninfod_name.c | 2 +-
|
|
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/ninfod/ninfod_name.c b/ninfod/ninfod_name.c
|
|
|
|
index c6e7c4a..967d7f7 100644
|
|
|
|
--- a/ninfod/ninfod_name.c
|
|
|
|
+++ b/ninfod/ninfod_name.c
|
|
|
|
@@ -260,7 +260,7 @@ static int nodeinfo_group(const char *dnsname, int namelen,
|
|
|
|
struct in6_addr *nigroup)
|
|
|
|
{
|
|
|
|
MD5_CTX ctxt;
|
|
|
|
- char digest[16];
|
|
|
|
+ unsigned char digest[16];
|
|
|
|
|
|
|
|
if (!dnsname || !nigroup)
|
|
|
|
return -1;
|
|
|
|
--
|
|
|
|
1.8.0.1
|
|
|
|
|
|
|
|
From a12f8d430e77ac8279d0f55bc81dc9cc2da2c70b Mon Sep 17 00:00:00 2001
|
|
|
|
From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
|
|
|
|
Date: Fri, 7 Dec 2012 01:29:55 +0900
|
|
|
|
Subject: [PATCH 2/5] ninfod: nanosleep(3) needs <time.h>.
|
|
|
|
|
|
|
|
| ninfod.c: In function 'ni_send':
|
|
|
|
| ninfod.c:363:4: warning: implicit declaration of function 'nanosleep' [-Wimplicit-function-declaration]
|
|
|
|
|
|
|
|
Patch based on iputils-20121125-ninfod-minor.patch from Fedora.
|
|
|
|
|
|
|
|
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
|
|
|
|
---
|
|
|
|
ninfod/ninfod.c | 11 +++++++++++
|
|
|
|
1 file changed, 11 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/ninfod/ninfod.c b/ninfod/ninfod.c
|
|
|
|
index 51f6e2a..23d88d9 100644
|
|
|
|
--- a/ninfod/ninfod.c
|
|
|
|
+++ b/ninfod/ninfod.c
|
|
|
|
@@ -73,6 +73,17 @@
|
|
|
|
# include <unistd.h>
|
2012-12-06 08:25:21 +00:00
|
|
|
#endif
|
|
|
|
|
2012-12-07 08:37:34 +00:00
|
|
|
+#ifdef TIME_WITH_SYS_TIME
|
|
|
|
+# include <sys/time.h>
|
|
|
|
+# include <time.h>
|
|
|
|
+#else
|
|
|
|
+# ifdef HAVE_SYS_TIME_H
|
|
|
|
+# include <sys/time.h>
|
|
|
|
+# else
|
|
|
|
+# include <time.h>
|
|
|
|
+# endif
|
|
|
|
+#endif
|
2012-12-06 08:25:21 +00:00
|
|
|
+
|
2012-12-07 08:37:34 +00:00
|
|
|
#if HAVE_SYS_UIO_H
|
|
|
|
#include <sys/uio.h>
|
|
|
|
#endif
|
|
|
|
--
|
|
|
|
1.8.0.1
|
|
|
|
|
|
|
|
From 2f76e615a71f28c31fbef05775aebc80855c743a Mon Sep 17 00:00:00 2001
|
|
|
|
From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
|
|
|
|
Date: Fri, 7 Dec 2012 01:35:00 +0900
|
|
|
|
Subject: [PATCH 3/5] ninfod: Too many arguments for syslog(3)/fprintf(3) via
|
|
|
|
DEBUG().
|
|
|
|
|
|
|
|
| ninfod.c: In function 'do_daemonize':
|
|
|
|
| ninfod.c:419:6: warning: too many arguments for format [-Wformat-extra-args]
|
|
|
|
|
|
|
|
Patch based on iputils-20121125-ninfod-minor.patch from Fedora.
|
|
|
|
|
|
|
|
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
|
|
|
|
---
|
|
|
|
ninfod/ninfod.c | 2 +-
|
|
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/ninfod/ninfod.c b/ninfod/ninfod.c
|
|
|
|
index 23d88d9..f7d2654 100644
|
|
|
|
--- a/ninfod/ninfod.c
|
|
|
|
+++ b/ninfod/ninfod.c
|
|
|
|
@@ -417,7 +417,7 @@ static void do_daemonize(void)
|
2012-12-06 08:25:21 +00:00
|
|
|
if ((fp = fopen(opt_p, "r"))) {
|
|
|
|
if (fscanf(fp, "%d", &pid) != 1) {
|
|
|
|
DEBUG(LOG_ERR, "pid file '%s' exists, but read failed.\n",
|
|
|
|
- opt_p, pid);
|
|
|
|
+ opt_p);
|
|
|
|
} else {
|
|
|
|
DEBUG(LOG_ERR, "pid file '%s' exists : %d\n",
|
|
|
|
opt_p, pid);
|
2012-12-07 08:37:34 +00:00
|
|
|
--
|
|
|
|
1.8.0.1
|
|
|
|
|
|
|
|
From 741f4d6a081a6a4a2f8314af1ed9880631c4a854 Mon Sep 17 00:00:00 2001
|
|
|
|
From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
|
|
|
|
Date: Fri, 7 Dec 2012 02:04:35 +0900
|
|
|
|
Subject: [PATCH 4/5] ninfod: Fix several warnings on ununsed variables.
|
|
|
|
|
|
|
|
| ninfod_core.c: In function 'pr_nodeinfo_noop':
|
|
|
|
| ninfod_core.c:244:25: warning: unused variable 'replybuf' [-Wunused-variable]
|
|
|
|
| ninfod_core.c: In function 'pr_nodeinfo_suptypes':
|
|
|
|
| ninfod_core.c:273:9: warning: unused variable 'replylen' [-Wunused-variable]
|
|
|
|
| ninfod.c: In function 'init_sock':
|
|
|
|
| ninfod.c:255:6: warning: unused variable 'i' [-Wunused-variable]
|
|
|
|
| ninfod.c: In function 'main':
|
|
|
|
| ninfod.c:636:6: warning: unused variable 'c' [-Wunused-variable]
|
|
|
|
|
|
|
|
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
|
|
|
|
---
|
|
|
|
ninfod/ninfod.c | 3 +--
|
|
|
|
ninfod/ninfod_core.c | 4 ----
|
|
|
|
2 files changed, 1 insertion(+), 6 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/ninfod/ninfod.c b/ninfod/ninfod.c
|
|
|
|
index f7d2654..802d5ed 100644
|
|
|
|
--- a/ninfod/ninfod.c
|
|
|
|
+++ b/ninfod/ninfod.c
|
|
|
|
@@ -252,9 +252,9 @@ static int set_recvpktinfo(int sock)
|
|
|
|
static int __inline__ init_sock(int sock)
|
|
|
|
{
|
|
|
|
struct icmp6_filter filter;
|
|
|
|
+#if NEED_IPV6CHECKSUM
|
|
|
|
int i;
|
|
|
|
|
|
|
|
-#if NEED_IPV6CHECKSUM
|
|
|
|
i = offsetof(struct icmp6_nodeinfo, ni_cksum);
|
|
|
|
if (setsockopt(sock,
|
|
|
|
IPPROTO_IPV6, IPV6_CHECKSUM,
|
|
|
|
@@ -633,7 +633,6 @@ static void print_usage(void) {
|
|
|
|
int main (int argc, char **argv)
|
|
|
|
{
|
|
|
|
int sock_errno = 0;
|
|
|
|
- int c;
|
|
|
|
|
|
|
|
appname = argv[0];
|
|
|
|
|
|
|
|
diff --git a/ninfod/ninfod_core.c b/ninfod/ninfod_core.c
|
|
|
|
index 47e9e7d..f411a7a 100644
|
|
|
|
--- a/ninfod/ninfod_core.c
|
|
|
|
+++ b/ninfod/ninfod_core.c
|
|
|
|
@@ -241,8 +241,6 @@ static __inline__ struct qtypeinfo *qtypeinfo_lookup(int qtype)
|
|
|
|
/* noop */
|
|
|
|
int pr_nodeinfo_noop(CHECKANDFILL_ARGS)
|
|
|
|
{
|
|
|
|
- struct icmp6_nodeinfo *replybuf = NULL;
|
|
|
|
-
|
|
|
|
DEBUG(LOG_DEBUG, "%s()\n", __func__);
|
|
|
|
|
|
|
|
if (subjlen) {
|
|
|
|
@@ -270,8 +268,6 @@ int pr_nodeinfo_noop(CHECKANDFILL_ARGS)
|
|
|
|
/* suptypes */
|
|
|
|
int pr_nodeinfo_suptypes(CHECKANDFILL_ARGS)
|
|
|
|
{
|
|
|
|
- size_t replylen = sizeof(struct icmp6_nodeinfo) + (suptypes_len<<2);
|
|
|
|
-
|
|
|
|
DEBUG(LOG_DEBUG, "%s()\n", __func__);
|
|
|
|
|
|
|
|
if (subjlen) {
|
|
|
|
--
|
|
|
|
1.8.0.1
|
|
|
|
|