diff options
author | Andrew Tridgell <tridge@samba.org> | 2002-07-09 14:17:26 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2002-07-09 14:17:26 +0000 |
commit | 7f42c53971bbbae42d879b67dc02d0579434496d (patch) | |
tree | 28b6e6bdd7a6ec0400fda91f6bfb8ac15eb8fbb1 /source3/nmbd | |
parent | 71b04673bbf665d1ee558a08614fbaaf77095152 (diff) | |
download | samba-7f42c53971bbbae42d879b67dc02d0579434496d.tar.gz samba-7f42c53971bbbae42d879b67dc02d0579434496d.tar.bz2 samba-7f42c53971bbbae42d879b67dc02d0579434496d.zip |
the last WINS update broke self registration when we are a WINS
server. The real problem is all the special cases we had for when we
are a wins server as opposed to when we are using a 'real' wins
server.
This patch removes the special cases. We now accept non-broadcast
packets from ourselves and we use ourselves as a wins server when we
are one. This gets rid of the special cases and simplifies things
quite a bit.
It all seems to work, but there are bound to be problems found later.
(This used to be commit 3e843d30158d05cdfba716bac7e5c0a75ae7a79c)
Diffstat (limited to 'source3/nmbd')
-rw-r--r-- | source3/nmbd/nmbd_packets.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c index 64b63627d7..a20ebf16fd 100644 --- a/source3/nmbd/nmbd_packets.c +++ b/source3/nmbd/nmbd_packets.c @@ -1866,8 +1866,9 @@ BOOL listen_for_packets(BOOL run_election) inet_ntoa(packet->ip),packet->port)); free_packet(packet); } else if ((ip_equal(loopback_ip, packet->ip) || - ismyip(packet->ip)) && packet->port == global_nmb_port) { - DEBUG(7,("discarding own packet from %s:%d\n", + ismyip(packet->ip)) && packet->port == global_nmb_port && + packet->packet.nmb.header.nm_flags.bcast) { + DEBUG(7,("discarding own bcast packet from %s:%d\n", inet_ntoa(packet->ip),packet->port)); free_packet(packet); } else { @@ -1893,7 +1894,7 @@ BOOL listen_for_packets(BOOL run_election) free_packet(packet); } else if ((ip_equal(loopback_ip, packet->ip) || ismyip(packet->ip)) && packet->port == DGRAM_PORT) { - DEBUG(7,("discarding own packet from %s:%d\n", + DEBUG(7,("discarding own dgram packet from %s:%d\n", inet_ntoa(packet->ip),packet->port)); free_packet(packet); } else { |