[ipvsadm/f17] Fix list_daemon to not assume sync daemon status is ordered (#805208).

rohara rohara at fedoraproject.org
Tue Mar 27 01:06:26 UTC 2012


commit 48c28cdb7b0afa235c3aa4095efcb12eb00a13a3
Author: Ryan O'Hara <rohara at redhat.com>
Date:   Mon Mar 26 20:05:55 2012 -0500

    Fix list_daemon to not assume sync daemon status is ordered (#805208).

 ipvsadm-1.26-list-daemon.patch |   29 +++++++++++++++++++++++++++++
 ipvsadm.spec                   |    7 ++++++-
 2 files changed, 35 insertions(+), 1 deletions(-)
---
diff --git a/ipvsadm-1.26-list-daemon.patch b/ipvsadm-1.26-list-daemon.patch
new file mode 100644
index 0000000..5300a07
--- /dev/null
+++ b/ipvsadm-1.26-list-daemon.patch
@@ -0,0 +1,29 @@
+diff -Naupr ipvsadm-1.26.orig/ipvsadm.c ipvsadm-1.26/ipvsadm.c
+--- ipvsadm-1.26.orig/ipvsadm.c	2011-02-06 20:38:57.000000000 -0600
++++ ipvsadm-1.26/ipvsadm.c	2012-03-26 16:58:42.796919112 -0500
+@@ -1631,16 +1631,19 @@ void list_timeout(void)
+ static void list_daemon(void)
+ {
+ 	ipvs_daemon_t *u;
++	int i;
+ 
+ 	if (!(u = ipvs_get_daemon()))
+ 		exit(1);
+ 
+-	if (u[0].state & IP_VS_STATE_MASTER)
+-		printf("master sync daemon (mcast=%s, syncid=%d)\n",
+-		       u[0].mcast_ifn, u[0].syncid);
+-	if (u[1].state & IP_VS_STATE_BACKUP)
+-		printf("backup sync daemon (mcast=%s, syncid=%d)\n",
+-		       u[1].mcast_ifn, u[1].syncid);
++	for (i = 0; i < 2; i++) {
++		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_BACKUP)
++			printf("backup sync daemon (mcast=%s, syncid=%d)\n",
++			       u[i].mcast_ifn, u[i].syncid);
++	}
+ 	free(u);
+ }
+ 
diff --git a/ipvsadm.spec b/ipvsadm.spec
index 307ea95..9d6cfbb 100644
--- a/ipvsadm.spec
+++ b/ipvsadm.spec
@@ -1,7 +1,7 @@
 Summary: Utility to administer the Linux Virtual Server
 Name: ipvsadm
 Version: 1.26
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: GPLv2+
 Group: Applications/System
 URL: http://www.linuxvirtualserver.org/software/ipvs.html
@@ -9,6 +9,7 @@ Source0: http://www.linuxvirtualserver.org/software/kernel-2.6/ipvsadm-%{version
 Source1: ipvsadm.init
 Source2: ipvsadm-config
 Patch0: ipvsadm-1.26-popt.patch
+Patch1: ipvsadm-1.26-list-daemon.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 Buildrequires: libnl-devel
 Buildrequires: popt-devel
@@ -23,6 +24,7 @@ offered by the Linux kernel.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 
 %build
@@ -67,6 +69,9 @@ fi
 
 
 %changelog
+* Mon Mar 26 2012 Ryan O'Hara <rohara at redhat.com> 1.26-4
+- Fix list_daemon to not assume sync daemon status is ordered (#805208).
+
 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.26-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 


More information about the scm-commits mailing list