From ab4577f141b0c08a543d998a36892bbafae4e902 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 30 Aug 1998 17:04:24 +0000 Subject: 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) --- source3/nmbd/nmbd_packets.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source3/nmbd/nmbd_packets.c') 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; -- cgit