summaryrefslogtreecommitdiff
path: root/source3/nmbd/nmbd_packets.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-02-26 22:58:21 +0000
committerJeremy Allison <jra@samba.org>1998-02-26 22:58:21 +0000
commit45dab9f06594777e96be5f4556e6bb386f68f309 (patch)
treed10f26229efd3f391ebcdf52fe1da7d563fad02f /source3/nmbd/nmbd_packets.c
parentb3d9fe61f3085bb47fe8c0c31f51871824db3407 (diff)
downloadsamba-45dab9f06594777e96be5f4556e6bb386f68f309.tar.gz
samba-45dab9f06594777e96be5f4556e6bb386f68f309.tar.bz2
samba-45dab9f06594777e96be5f4556e6bb386f68f309.zip
Makefile, password.c, includes.h: Added KRB4 patches from Johan Hedin <johanh@fusion.kth.se>
nmbd_packets.c: Patch for aliased interfaces from Daniel Haun <dhaun@ecf2.puc.edu>. Jeremy. (This used to be commit 60f6302b1972e49159bf6e1a838e691268e4399c)
Diffstat (limited to 'source3/nmbd/nmbd_packets.c')
-rw-r--r--source3/nmbd/nmbd_packets.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c
index cd99343e70..f14c62c4eb 100644
--- a/source3/nmbd/nmbd_packets.c
+++ b/source3/nmbd/nmbd_packets.c
@@ -59,6 +59,21 @@ static int find_subnet_fd_for_address( struct in_addr local_ip )
}
/***************************************************************************
+Utility function to find the specific fd to send a mailslot packet out on.
+**************************************************************************/
+
+static int find_subnet_mailslot_fd_for_address( struct in_addr local_ip )
+{
+ struct subnet_record *subrec;
+
+ for( subrec = FIRST_SUBNET; subrec; subrec = NEXT_SUBNET_EXCLUDING_UNICAST(subrec))
+ if(ip_equal(local_ip, subrec->myip))
+ return subrec->dgram_sock;
+
+ return ClientDGRAM;
+}
+
+/***************************************************************************
Get/Set problematic nb_flags as network byte order 16 bit int.
**************************************************************************/
@@ -1828,7 +1843,7 @@ BOOL send_mailslot(BOOL unique, char *mailslot,char *buf,int len,
p.ip = dest_ip;
p.port = DGRAM_PORT;
- p.fd = ClientDGRAM;
+ p.fd = find_subnet_mailslot_fd_for_address( src_ip );
p.timestamp = time(NULL);
p.packet_type = DGRAM_PACKET;