From 89652787c3894c7a79345a2ea67a4de741a0f760 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 29 Jan 1998 08:25:46 +0000 Subject: Makefile: Fix for OSF1 typo. asyncdns.c: Fixes that went into 1.9.18p2 - allow unclocking of sigterm. chgpasswd.c: char -> unsigned char fixes. includes.h: AIX fix to get prototype for inet_ntoa. local.h: Tune size of shared memory based on MAX_OPEN_FILES. nmbd_mynames.c: Fix for nmbd repeated refresh bug. nmbd_responserecordsdb.c: Fix for nmbd repeated refresh bug. nmbd_winsserver.c: Fix for multi-homed registration optimisation. smb.h: Moved default shared memory size to local.h Jeremy. (This used to be commit fa5466805685d461564054d7d9947948fc56ae93) --- source3/nmbd/nmbd_winsserver.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'source3/nmbd/nmbd_winsserver.c') diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c index eb120e0918..134b758c29 100644 --- a/source3/nmbd/nmbd_winsserver.c +++ b/source3/nmbd/nmbd_winsserver.c @@ -1051,6 +1051,18 @@ is one of our (WINS server) names. Denying registration.\n", namestr(question) ) } } + /* + * If the name exists check if the IP address is already registered + * to that name. If so then update the ttl and reply success. + */ + + if((namerec != NULL) && find_ip_in_name_record(namerec, from_ip)) + { + update_name_ttl(namerec, ttl); + send_wins_name_registration_response(0, ttl, p); + return; + } + /* * If the name exists do a query to the owner * to see if they still want the name. @@ -1548,7 +1560,7 @@ void wins_write_database(void) if (namerec->source == REGISTER_NAME) { - fprintf(fp, "%s#%02x %d ", + fprintf(fp, "\"%s#%02x\" %d ", namerec->name.name,namerec->name.name_type, /* Ignore scope. */ (int)namerec->death_time); -- cgit