[netdump-server] Resolves: bz784923

Neil Horman nhorman at fedoraproject.org
Fri Jan 27 13:42:18 UTC 2012


commit 216cc68c900d0c0bec52f90c016907309659dd79
Author: Neil Horman <nhorman at tuxdriver.com>
Date:   Fri Jan 27 08:42:05 2012 -0500

    Resolves: bz784923

 netdump-server-use-ip-cmd.patch |   36 ++++++++++++++++++++++++++++++++++++
 netdump-server.spec             |    7 ++++++-
 2 files changed, 42 insertions(+), 1 deletions(-)
---
diff --git a/netdump-server-use-ip-cmd.patch b/netdump-server-use-ip-cmd.patch
new file mode 100644
index 0000000..313f3d4
--- /dev/null
+++ b/netdump-server-use-ip-cmd.patch
@@ -0,0 +1,36 @@
+diff -up netdump-0.7.16/netdump.init.orig netdump-0.7.16/netdump.init
+--- netdump-0.7.16/netdump.init.orig	2012-01-27 08:35:12.282866759 -0500
++++ netdump-0.7.16/netdump.init	2012-01-27 08:35:32.121405853 -0500
+@@ -132,22 +132,16 @@ print_address_info ()
+     arping -c 1 -I $DEV $mac_ip &> /dev/null
+     [ $? -ne 0 ] && echo "$prog: cannot arp $mac_ip on $DEV" 1>&2
+ 
+-    # output from arp -a of the form:
+-    # good: host.domain (A.B.C.D) at 00:50:BF:06:48:C1 [ether] on eth0
+-    #           1           2      3         4            5     6   7
+-    # bad:  ? (A.B.C.D) at <incomplete> on eth0
+-    arp_output="$(LC_ALL=C arp -a | grep -v incomplete)"
+-    echo "$arp_output" | ( while read hostname ipaddr at mac iftype on iface;
+-    do
+-	: echo hostname=$hostname ipaddr=$ipaddr at=$at mac=$mac iftype=$iftype
+-	: echo on=$on iface=$iface
+-        if [ "$ipaddr" = "($mac_ip)" ] || expr "$hostname" : "$host" &>/dev/null;
+-	then
+-            echo HOSTNAME=$host IPADDR=$host_ip AT=$at MAC=$mac \
+-                 TYPE=$iftype ON=$on IFACE=$iface
+-	    exit 0
++    # output from ip -4 neigh of the form:
++    # good: A.B.C.D dev eth0 lladdr 00:50:bf:06:48:c1 REACHABLE
++    #          1     2   3     4            5             6   
++    # bad:  A.B.C.D dev eth0 FAILED
++    arp_output="$(LC_ALL=C ip -4 neigh show to $mac_ip | grep lladdr)"
++    echo "$arp_output" | ( read ipaddr dev iface lladdr mac state;
++        if [ -n "${iface}" ] && [ -n "${mac}" ]; then
++            echo IPADDR=$host_ip IFACE=$iface MAC=$mac
++            exit 0
+         fi
+-    done
+     exit 1 )
+ 
+     if [ $? -eq 1 ]; then
+ 
diff --git a/netdump-server.spec b/netdump-server.spec
index 91803fb..44cbeb5 100644
--- a/netdump-server.spec
+++ b/netdump-server.spec
@@ -1,7 +1,7 @@
 Summary: Server for network kernel message logging and crash dumps
 Name: netdump-server
 Version: 0.7.16
-Release: 27%{dist}
+Release: 28%{dist}
 # This is a Red Hat maintained package which is specific to
 # our distribution.  Thus the source is only available from
 # within this srpm.
@@ -25,6 +25,7 @@ Patch6: netdump-makefile-servonly.patch
 Patch7: netdump-server-Makefile.patch
 Patch8: netdump-server-init.patch
 Patch9: netdump-clientport.patch
+Patch10: netdump-server-use-ip-cmd.patch
 
 Group: System Environment/Daemons
 
@@ -45,6 +46,7 @@ contact it and then writes the oops log and a memory dump to
 %patch7 -p1
 %patch8 -p1
 %patch9 -p1
+%patch10 -p1
 
 %build
 export CFLAGS="%{optflags} `glib-config --cflags`"; make %{?_smp_mflags}
@@ -97,6 +99,9 @@ fi
 %doc COPYING
 
 %changelog
+* Fri Jan 27 2012 Neil Horman <nhorman at redhat.com> - 0.7.16-28
+- Swapped use of ip for ifconfig (bz 784923)
+
 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.7.16-27
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 


More information about the scm-commits mailing list