Fix ipvsadm list_daemon to show backup sync daemon
This commit is contained in:
parent
6659c871a5
commit
87e5752e63
33
ipvsadm-list-daemon.patch
Normal file
33
ipvsadm-list-daemon.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
From 8ca22ba019c0b4d72a54a0954fcc04848dba4579 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ryan O'Hara <rohara@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@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
|
||||||
|
|
13
ipvsadm.spec
13
ipvsadm.spec
@ -9,8 +9,9 @@ Source0: https://kernel.org/pub/linux/utils/kernel/ipvsadm/%{name}-%{version}.ta
|
|||||||
Source1: ipvsadm.service
|
Source1: ipvsadm.service
|
||||||
Source2: ipvsadm-config
|
Source2: ipvsadm-config
|
||||||
|
|
||||||
Patch0: ipvsadm-init-variable.patch
|
Patch0: ipvsadm-fix-warnings.patch
|
||||||
Patch1: ipvsadm-fix-warnings.patch
|
Patch1: ipvsadm-init-variable.patch
|
||||||
|
Patch2: ipvsadm-list-daemon.patch
|
||||||
|
|
||||||
Buildrequires: libnl3-devel
|
Buildrequires: libnl3-devel
|
||||||
Buildrequires: popt-devel
|
Buildrequires: popt-devel
|
||||||
@ -36,8 +37,9 @@ services. Supported Features include:
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1
|
%patch0 -p0
|
||||||
%patch1 -p0
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
CFLAGS="%{optflags}" make
|
CFLAGS="%{optflags}" make
|
||||||
@ -76,6 +78,9 @@ CFLAGS="%{optflags}" make
|
|||||||
%{_mandir}/man8/%{name}-save.8*
|
%{_mandir}/man8/%{name}-save.8*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed May 21 2014 Ryan O'Hara <rohara@redhat.com> - 1.27-5
|
||||||
|
- Fix ipvsadm to show backup sync daemon
|
||||||
|
|
||||||
* Tue May 20 2014 Ryan O'Hara <rohara@redhat.com> - 1.27-4
|
* Tue May 20 2014 Ryan O'Hara <rohara@redhat.com> - 1.27-4
|
||||||
- Fix compiler warnings
|
- Fix compiler warnings
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user