summaryrefslogtreecommitdiff
path: root/source4/lib/socket
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-12 02:15:29 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:49:42 +0100
commit4b0199a5493ea2b88558cc40871e63c1dc8dbb56 (patch)
tree684450d46a7787e2f3a2a1b20ac0488c1ca8e94f /source4/lib/socket
parent33582dffcc2d348dc042edfdcccee7500b21d928 (diff)
downloadsamba-4b0199a5493ea2b88558cc40871e63c1dc8dbb56.tar.gz
samba-4b0199a5493ea2b88558cc40871e63c1dc8dbb56.tar.bz2
samba-4b0199a5493ea2b88558cc40871e63c1dc8dbb56.zip
r26409: Pass smb ports along.
(This used to be commit 2833f320de1f1fd39c710ad0a61c3fa1bb1df31f)
Diffstat (limited to 'source4/lib/socket')
-rw-r--r--source4/lib/socket/socket_ip.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/lib/socket/socket_ip.c b/source4/lib/socket/socket_ip.c
index e3676ad71a..e61b6d82fc 100644
--- a/source4/lib/socket/socket_ip.c
+++ b/source4/lib/socket/socket_ip.c
@@ -130,6 +130,8 @@ static NTSTATUS ipv4_connect(struct socket_context *sock,
if (!srv_ip.s_addr) {
return NT_STATUS_BAD_NETWORK_NAME;
}
+
+ SMB_ASSERT(srv_address->port != 0);
ZERO_STRUCT(srv_addr);
#ifdef HAVE_SOCK_SIN_LEN
@@ -356,6 +358,8 @@ static NTSTATUS ipv4_sendto(struct socket_context *sock,
} else {
struct sockaddr_in srv_addr;
struct in_addr addr;
+
+ SMB_ASSERT(dest_addr->port != 0);
ZERO_STRUCT(srv_addr);
#ifdef HAVE_SOCK_SIN_LEN