Created attachment 7748 [details] AD packet trace during duplicate workstation join which fails properly The name registration request for a new workstation to the nmbd acting as a wins server checks for various things. One of the check is for the presence of the same name. There is a difference in the behavior of nmbd and the active directory. The nmbd fails with following error : [2012/07/05 14:07:51, 3] nmbd/nmbd_winsserver.c:2046(wins_process_name_release_request) wins_process_name_release_request: Unique name release for name XPMG<00> IP 172.16.43.96 [2012/07/05 14:07:51, 3] nmbd/nmbd_winsserver.c:2089(wins_process_name_release_request) wins_process_name_release_request: Refusing request to release name XPMG<00> as IP 172.16.43.96 is not one of the known IP's for this name. [2012/07/05 14:07:51, 4] nmbd/nmbd_packets.c:945(reply_netbios_packet) reply_netbios_packet: sending a reply of packet type: nmb_rel XPMG<00> to ip 172.16.43.96 for id 33953 [2012/07/05 14:07:51, 4] libsmb/nmblib.c:106(debug_nmb_packet) This is different from the way active directory acting as a WINS. By capturing the packet traces in for nmbd and AD, we see the difference. Attaching the wins_ad_duplicate_wks_join.pcap, where the packet 2273,2274 has the response for the nbns query. I will attach the nmbd.log and the packet traces for nmbd acting as WINS shortly.
Created attachment 7749 [details] Packet traces with NMBD acting as WINS The packet traces are captured with nmbd acting as wins. During that for duplicate workstation registration, the error returned is "Request refused".
Created attachment 7750 [details] NMBD log capturing the "Request Refused" error from nmbd acting as WINS The nmbd log giving the error for duplicate registration as "Request Refused". This is not matching with the active directory acting as WINS. So the workstation join to the samba domain doesn't fail.
Created attachment 7751 [details] Probable fix for the issue for duplicate registration when NMBD acts as WINS Proposing the fix for the duplicate workstation registration issue.
Similar issue is seen with samba 3.4.3 too.
Comment on attachment 7751 [details] Probable fix for the issue for duplicate registration when NMBD acts as WINS Looks completely correct to me. Requesting Additional review to add to 3.5.next and 3.6.next.
Comment on attachment 7751 [details] Probable fix for the issue for duplicate registration when NMBD acts as WINS Trying to get some review :-).
Comment on attachment 7751 [details] Probable fix for the issue for duplicate registration when NMBD acts as WINS Looks fine for me.
Comment on attachment 7751 [details] Probable fix for the issue for duplicate registration when NMBD acts as WINS Looks good.
Re-assigning to Karolin for inclusion in 3.5.x and 3.6.x. Jeremy.
Pushed to v3-5-test and v3-6-test (and verified that it's fixed in master). Closing out bug report. Thanks!
I really appreciate the response on the bug. Thanks everybody !