From bf86562144fe4e9541bd993519aca958c2bdb794 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 19 Jan 2009 13:24:09 +0100 Subject: [PATCH] ctdb_sys_have_ip: don't overwrite input data (setting port to 0) metze Signed-off-by: Michael Adam (This used to be ctdb commit de71ce2195bb4f6a96b12437a2d4d1424fd1c59c) --- ctdb/common/system_linux.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ctdb/common/system_linux.c b/ctdb/common/system_linux.c index 6c0efc1f024..0d5ea631b9d 100644 --- a/ctdb/common/system_linux.c +++ b/ctdb/common/system_linux.c @@ -413,10 +413,12 @@ int ctdb_sys_send_tcp(const ctdb_sock_addr *dest, ifname, if non-NULL, will return the name of the interface this ip is tied to */ -bool ctdb_sys_have_ip(ctdb_sock_addr *addr) +bool ctdb_sys_have_ip(ctdb_sock_addr *_addr) { int s; int ret; + ctdb_sock_addr __addr = *_addr; + ctdb_sock_addr *addr = &__addr; switch (addr->sa.sa_family) { case AF_INET: