mirror of
https://github.com/samba-team/samba.git
synced 2024-12-31 17:18:04 +03:00
ctdb_sys_have_ip: don't overwrite input data (setting port to 0)
metze Signed-off-by: Michael Adam <obnox@samba.org> (This used to be ctdb commit de71ce2195bb4f6a96b12437a2d4d1424fd1c59c)
This commit is contained in:
parent
3dea35263c
commit
bf86562144
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user