[iputils] Update ninfod-minor patch
jsynacek
jsynacek at fedoraproject.org
Fri Dec 7 10:10:08 UTC 2012
commit af97258fd9b2024ff87e81d6566416d5d0d532c2
Author: Jan Synacek <jsynacek at redhat.com>
Date: Fri Dec 7 09:37:34 2012 +0100
Update ninfod-minor patch
iputils-20121125-ninfod-minor.patch | 169 ++++++++++++++++++++++++++++++++---
iputils.spec | 1 +
2 files changed, 159 insertions(+), 11 deletions(-)
---
diff --git a/iputils-20121125-ninfod-minor.patch b/iputils-20121125-ninfod-minor.patch
index 00ae0e6..e17dc44 100644
--- a/iputils-20121125-ninfod-minor.patch
+++ b/iputils-20121125-ninfod-minor.patch
@@ -1,19 +1,95 @@
-Minor compilation (warnings) fixes.
+From 2d14cdf412c753b9cf778f1c80bf116651e15816 Mon Sep 17 00:00:00 2001
+From: YOSHIFUJI Hideaki <yoshfuji at linux-ipv6.org>
+Date: Fri, 7 Dec 2012 01:28:31 +0900
+Subject: [PATCH 1/5] ninfod: Use unsigned int for digest.
-Author: Jan Synacek <jsynacek at redhat.com>
+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 *'
---- iputils-s20121125/ninfod/ninfod.c.orig 2012-11-25 08:42:40.000000000 +0100
-+++ iputils-s20121125/ninfod/ninfod.c 2012-12-06 08:29:12.323928153 +0100
-@@ -110,6 +110,8 @@
- # include <sys/capability.h>
+Signed-off-by: YOSHIFUJI Hideaki <yoshfuji at 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 at 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 at 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>
#endif
-+#include <time.h>
++#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
+
- #include "ninfod.h"
-
- #ifndef offsetof
-@@ -406,7 +408,7 @@ static void do_daemonize(void)
+ #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 at 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 at 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)
if ((fp = fopen(opt_p, "r"))) {
if (fscanf(fp, "%d", &pid) != 1) {
DEBUG(LOG_ERR, "pid file '%s' exists, but read failed.\n",
@@ -22,3 +98,74 @@ Author: Jan Synacek <jsynacek at redhat.com>
} else {
DEBUG(LOG_ERR, "pid file '%s' exists : %d\n",
opt_p, pid);
+--
+1.8.0.1
+
+From 741f4d6a081a6a4a2f8314af1ed9880631c4a854 Mon Sep 17 00:00:00 2001
+From: YOSHIFUJI Hideaki <yoshfuji at 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 at 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
+
diff --git a/iputils.spec b/iputils.spec
index 2422866..3c7661f 100644
--- a/iputils.spec
+++ b/iputils.spec
@@ -179,6 +179,7 @@ mv -f RELNOTES.tmp RELNOTES
* Fri Dec 07 2012 Jan Synáček <jsynacek at redhat.com> - 20121207-1
- Update to iputils-s20121207 (#884983) - fixes a ping segfault introduced
by the previous update
+- Update ninfod-minor patch
* Thu Dec 06 2012 Jan Synáček <jsynacek at redhat.com> - 20121205-1
- Update to iputils-s20121205 (#884436) and remove unnecessary patches
More information about the scm-commits
mailing list