Fix list_daemon to not assume sync daemon status is ordered (#805208).
This commit is contained in:
parent
ea7131d149
commit
a4465310e8
29
ipvsadm-1.26-list-daemon.patch
Normal file
29
ipvsadm-1.26-list-daemon.patch
Normal file
@ -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);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: Utility to administer the Linux Virtual Server
|
||||
Name: ipvsadm
|
||||
Version: 1.26
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?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.service
|
||||
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
|
||||
@ -26,6 +27,7 @@ offered by the Linux kernel.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
|
||||
%build
|
||||
@ -92,6 +94,9 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Jul 9 2912 Ryan O'Hara <rohara@redhat.com> - 1.26-5
|
||||
- Fix list_daemon to not assume sync daemon status is ordered (#805208).
|
||||
|
||||
* Thu Apr 19 2012 Jon Ciesla <limburgher@gmail.com> - 1.26-4
|
||||
- Migrate to systemd, BZ 720175.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user