summaryrefslogtreecommitdiff
path: root/source3/nmbd/nmbd_packets.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-08-30 17:04:24 +0000
committerAndrew Tridgell <tridge@samba.org>1998-08-30 17:04:24 +0000
commitab4577f141b0c08a543d998a36892bbafae4e902 (patch)
treea2d62a7f490913d7bc44e55d58db92b6cae0fa0f /source3/nmbd/nmbd_packets.c
parent98b0fafc6132e12bc9b7e39784cb2e221a8a5125 (diff)
downloadsamba-ab4577f141b0c08a543d998a36892bbafae4e902.tar.gz
samba-ab4577f141b0c08a543d998a36892bbafae4e902.tar.bz2
samba-ab4577f141b0c08a543d998a36892bbafae4e902.zip
added a dest_port parameter to send_mailslot() so we send replies to
the correct port in environments like ip masq. (This used to be commit 7d455ee637b6ff70c95845f89d71573ca07b83f3)
Diffstat (limited to 'source3/nmbd/nmbd_packets.c')
-rw-r--r--source3/nmbd/nmbd_packets.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c
index 65d98c9a59..816695833a 100644
--- a/source3/nmbd/nmbd_packets.c
+++ b/source3/nmbd/nmbd_packets.c
@@ -1875,13 +1875,12 @@ BOOL listen_for_packets(BOOL run_election)
/****************************************************************************
Construct and send a netbios DGRAM.
- Note that this currently sends all packets to port 138.
**************************************************************************/
-
BOOL send_mailslot(BOOL unique, char *mailslot,char *buf,int len,
char *srcname, int src_type,
char *dstname, int dest_type,
- struct in_addr dest_ip,struct in_addr src_ip)
+ struct in_addr dest_ip,struct in_addr src_ip,
+ int dest_port)
{
BOOL loopback_this_packet = False;
struct packet_struct p;
@@ -1936,7 +1935,7 @@ BOOL send_mailslot(BOOL unique, char *mailslot,char *buf,int len,
dgram->datasize = PTR_DIFF(p2,ptr+4); /* +4 for tcp length. */
p.ip = dest_ip;
- p.port = DGRAM_PORT;
+ p.port = dest_port;
p.fd = find_subnet_mailslot_fd_for_address( src_ip );
p.timestamp = time(NULL);
p.packet_type = DGRAM_PACKET;