summaryrefslogtreecommitdiff
path: root/lib/tsocket
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-02-17 08:42:22 +0100
committerStefan Metzmacher <metze@samba.org>2010-02-17 14:13:57 +0100
commit135543b4c300e2fc31ee4165ce630644e1aef455 (patch)
treef77a98b4efba30459448b735a369432f51261a3c /lib/tsocket
parent0b3e950731fe72a258a631e39ca1304d54663536 (diff)
downloadsamba-135543b4c300e2fc31ee4165ce630644e1aef455.tar.gz
tsocket/bsd: fix do_bind logic for AF_INET
We want the explicit bind() when we don't use the any address. metze
Diffstat (limited to 'lib/tsocket')
-rw-r--r--lib/tsocket/tsocket_bsd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tsocket/tsocket_bsd.c b/lib/tsocket/tsocket_bsd.c
index 7c0255742cf..5cd7702ff6b 100644
--- a/lib/tsocket/tsocket_bsd.c
+++ b/lib/tsocket/tsocket_bsd.c
@@ -1170,7 +1170,7 @@ static int tdgram_bsd_dgram_socket(const struct tsocket_address *local,
do_reuseaddr = true;
do_bind = true;
}
- if (lbsda->u.in.sin_addr.s_addr == INADDR_ANY) {
+ if (lbsda->u.in.sin_addr.s_addr != INADDR_ANY) {
do_bind = true;
}
break;
@@ -1979,7 +1979,7 @@ static struct tevent_req * tstream_bsd_connect_send(TALLOC_CTX *mem_ctx,
do_reuseaddr = true;
do_bind = true;
}
- if (lbsda->u.in.sin_addr.s_addr == INADDR_ANY) {
+ if (lbsda->u.in.sin_addr.s_addr != INADDR_ANY) {
do_bind = true;
}
break;