[ipvsadm/f20] Fix ipvsadm list_daemon to show backup sync daemon

rohara rohara at fedoraproject.org
Wed May 21 13:27:41 UTC 2014


commit aad56dc9d3854f8c1b2de983c845b65aceef097a
Author: Ryan O'Hara <rohara at redhat.com>
Date:   Wed May 21 08:26:57 2014 -0500

    Fix ipvsadm list_daemon to show backup sync daemon

 ipvsadm-list-daemon.patch |   33 +++++++++++++++++++++++++++++++++
 ipvsadm.spec              |    8 +++++++-
 2 files changed, 40 insertions(+), 1 deletions(-)
---
diff --git a/ipvsadm-list-daemon.patch b/ipvsadm-list-daemon.patch
new file mode 100644
index 0000000..cb591f2
--- /dev/null
+++ b/ipvsadm-list-daemon.patch
@@ -0,0 +1,33 @@
+From 8ca22ba019c0b4d72a54a0954fcc04848dba4579 Mon Sep 17 00:00:00 2001
+From: Ryan O'Hara <rohara at redhat.com>
+Date: Tue, 20 May 2014 22:04:09 -0500
+Subject: [PATCH] ipvsadm: Fix list daemon to show backup daemon
+
+The list_daemon function in ipvsadm.c will show the master daemon
+twice, but never the backup daemon. This patch replaces the redundant
+check for IP_VS_STATE_MASTER with a check for IP_VS_STATE_BACKUP, then
+prints the appropriate message.
+
+Signed-off-by: Ryan O'Hara <rohara at redhat.com>
+---
+ ipvsadm.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/ipvsadm.c b/ipvsadm.c
+index 4c83a8b..755827f 100644
+--- a/ipvsadm.c
++++ b/ipvsadm.c
+@@ -1732,8 +1732,8 @@ static void list_daemon(void)
+ 		if (u[i].state & IP_VS_STATE_MASTER)
+ 			printf("master sync daemon (mcast=%s, syncid=%d)\n",
+ 			       u[i].mcast_ifn, u[i].syncid);
+-		if (u[i].state & IP_VS_STATE_MASTER)
+-			printf("master sync daemon (mcast=%s, syncid=%d)\n",
++		if (u[i].state & IP_VS_STATE_BACKUP)
++			printf("backup sync daemon (mcast=%s, syncid=%d)\n",
+ 			       u[i].mcast_ifn, u[i].syncid);
+ 	}
+ 	free(u);
+-- 
+1.9.0
+
diff --git a/ipvsadm.spec b/ipvsadm.spec
index f925c5b..d3b6451 100644
--- a/ipvsadm.spec
+++ b/ipvsadm.spec
@@ -1,7 +1,7 @@
 Name: ipvsadm
 Summary: Utility to administer the Linux Virtual Server
 Version: 1.27
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: GPLv2+
 URL: https://kernel.org/pub/linux/utils/kernel/ipvsadm/
 Group: Applications/System
@@ -10,6 +10,8 @@ Source0: https://kernel.org/pub/linux/utils/kernel/ipvsadm/%{name}-%{version}.ta
 Source1: ipvsadm.service
 Source2: ipvsadm-config
 
+Patch0: ipvsadm-list-daemon.patch
+
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 Buildrequires: libnl-devel
 Buildrequires: popt-devel
@@ -27,6 +29,7 @@ offered by the Linux kernel.
 
 %prep
 %setup -q
+%patch0 -p1
 
 
 %build
@@ -83,6 +86,9 @@ rm -rf %{buildroot}
 
 
 %changelog
+* Wed May 21 2041 Ryan O'Hara <rohara at redhat.com> - 1.27-2
+- Fix ipvsadm list_daemon to show backup sync daemon
+
 * Fri Sep 06 2013 Ryan O'Hara <rohara at redhat.com> - 1.27-1
 - Update to 1.27
 


More information about the scm-commits mailing list