diff options
author | cvs2svn Import User <samba-bugs@samba.org> | 1997-10-21 16:43:44 +0000 |
---|---|---|
committer | cvs2svn Import User <samba-bugs@samba.org> | 1997-10-21 16:43:44 +0000 |
commit | 46a05ffe430b3db815d567f09b0f293b2a9bd269 (patch) | |
tree | 1a63a7ef14f516dbdc1bbbc0ff2cedf1a0070bd1 /source/namepacket.c | |
parent | 332f78bbc945c327069e9c9e29c7137c8cbd5c02 (diff) | |
parent | 460186a1b4de8ddeebe9d37faafd9b5b321ee493 (diff) | |
download | samba-1.9.17p4.tar.gz samba-1.9.17p4.tar.xz samba-1.9.17p4.zip |
This commit was manufactured by cvs2svn to create tagsamba-1.9.17p4
'release-1-9-17p4'.
Diffstat (limited to 'source/namepacket.c')
-rw-r--r-- | source/namepacket.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source/namepacket.c b/source/namepacket.c index 44e449b8c2a..fb8e4d2bf5b 100644 --- a/source/namepacket.c +++ b/source/namepacket.c @@ -37,6 +37,7 @@ extern int num_response_packets; BOOL CanRecurse = True; extern pstring scope; extern struct in_addr wins_ip; +extern struct in_addr loopback_ip; static uint16 name_trn_id=0; @@ -228,14 +229,14 @@ void reply_netbios_packet(struct packet_struct *p1,int trn_id, } default: { - DEBUG(1,("replying netbios packet: %s %s\n", + DEBUG(1,("replying netbios packet: %s %s %s\n", packet_type, namestr(rr_name), inet_ntoa(p.ip))); return; } } - DEBUG(4,("replying netbios packet: %s %s\n", + DEBUG(4,("replying netbios packet: %s %s %s\n", packet_type, namestr(rr_name), inet_ntoa(p.ip))); nmb->header.name_trn_id = trn_id; @@ -528,7 +529,9 @@ void listen_for_packets(BOOL run_election) struct packet_struct *packet = read_packet(ClientNMB, NMB_PACKET); if (packet) { - if (ismyip(packet->ip) && packet->port == NMB_PORT) + if ((ip_equal(loopback_ip, packet->ip) || + ismyip(packet->ip)) && + packet->port == NMB_PORT) { DEBUG(7,("discarding own packet from %s:%d\n", inet_ntoa(packet->ip),packet->port)); @@ -546,7 +549,9 @@ void listen_for_packets(BOOL run_election) struct packet_struct *packet = read_packet(ClientDGRAM, DGRAM_PACKET); if (packet) { - if (ismyip(packet->ip) && packet->port == DGRAM_PORT) + if ((ip_equal(loopback_ip, packet->ip) || + ismyip(packet->ip)) && + packet->port == DGRAM_PORT) { DEBUG(7,("discarding own packet from %s:%d\n", inet_ntoa(packet->ip),packet->port)); |