aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan O'Hara <rohara@redhat.com>2014-05-20 22:14:31 -0500
committerJesper Dangaard Brouer <brouer@redhat.com>2014-06-10 09:21:01 +0200
commit4cebeb8ea668675490a6d60a5726fd982dcc1a58 (patch)
treef2a87f3fe4d2ab6dfd3acf46248e3a71cd343c4d
parentcd824937ad6588be2ec701ee87fba6ee2626e515 (diff)
downloadipvsadm-4cebeb8ea668675490a6d60a5726fd982dcc1a58.tar.gz
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> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
-rw-r--r--ipvsadm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ipvsadm.c b/ipvsadm.c
index 16ccce6..602bcf6 100644
--- a/ipvsadm.c
+++ b/ipvsadm.c
@@ -1733,8 +1733,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);