summaryrefslogtreecommitdiff
path: root/source3/nmbd/nmbd_nameregister.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-03-12 10:57:31 -0700
committerJeremy Allison <jra@samba.org>2009-03-12 10:57:31 -0700
commit5c63388f63028af9bac2acb2ef0a38736278823b (patch)
tree4b24a01245685b1f5555f54e12b70725595735af /source3/nmbd/nmbd_nameregister.c
parent4b57f6dd34d1ddbdc7b011de1ea7041ec8215dec (diff)
downloadsamba-5c63388f63028af9bac2acb2ef0a38736278823b.tar.gz
Fix bug #6186 - map readonly does not work
Jeremy.
Diffstat (limited to 'source3/nmbd/nmbd_nameregister.c')
-rw-r--r--source3/nmbd/nmbd_nameregister.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/nmbd/nmbd_nameregister.c b/source3/nmbd/nmbd_nameregister.c
index 98f129aa892..d4359aab37d 100644
--- a/source3/nmbd/nmbd_nameregister.c
+++ b/source3/nmbd/nmbd_nameregister.c
@@ -104,6 +104,14 @@ static void register_name_response(struct subnet_record *subrec,
subrec->subnet_name, nmb->header.rcode, inet_ntoa(p->ip)));
success = False;
} else {
+ if (!ip_equal_v4(rrec->packet->ip, p->ip)) {
+ DEBUG(5,("register_name_response: Ignoring WINS server response "
+ "from IP %s, for name %s. We sent to IP %s\n",
+ inet_ntoa(p->ip),
+ nmb_namestr(answer_name),
+ inet_ntoa(rrec->packet->ip)));
+ return;
+ }
/* Unicast - check to see if the response allows us to have the name. */
if (nmb->header.opcode == NMB_WACK_OPCODE) {
/* WINS server is telling us to wait. Pretend we didn't get