git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b3e950
)
tsocket/bsd: fix do_bind logic for AF_INET
author
Stefan Metzmacher
<metze@samba.org>
Wed, 17 Feb 2010 07:42:22 +0000
(08:42 +0100)
committer
Stefan Metzmacher
<metze@samba.org>
Wed, 17 Feb 2010 13:13:57 +0000
(14:13 +0100)
We want the explicit bind() when we don't use the any address.
metze
lib/tsocket/tsocket_bsd.c
patch
|
blob
|
history
diff --git
a/lib/tsocket/tsocket_bsd.c
b/lib/tsocket/tsocket_bsd.c
index 7c0255742cffa171d68bd590fb72d077e640fade..5cd7702ff6b1aded6a814e43ae3f630b24c32451 100644
(file)
--- 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;