LMHOSTS as static WINS entry repository?

Volker Lendecke Volker.Lendecke at SerNet.DE
Sun Apr 27 13:52:18 GMT 2003


Hi!

During sambaXP we discussed ways to supply the WINS server with static
entries. Now that wins.dat has been moved to a wins.tdb, vi as the main
tool is gone. One idea would be to take the WINS server's lmhosts file
and feed the wins clients from there for all the names that DNS can't
provide. Only #00 and #20 are handed to DNS currently, so for example #1b
does not work here. John and Metze were busy writing a wins.tdb editor,
which would definitely be the way to go. As we have feature freeze
really soon, the following trivial patch might also provide a solution:
Feed the wins_server_subnet with all the entries from the lmhosts file.

Comments?

Index: nmbd/nmbd_lmhosts.c
===================================================================
RCS file: /space/vl/cvstree/samba/source/nmbd/nmbd_lmhosts.c,v
retrieving revision 1.9
diff -u -r1.9 nmbd_lmhosts.c
--- nmbd/nmbd_lmhosts.c	30 Jan 2002 06:08:22 -0000	1.9
+++ nmbd/nmbd_lmhosts.c	27 Apr 2003 13:42:42 -0000
@@ -69,6 +69,7 @@
       /* Add the given name type to the subnet namelist. */
       (void)add_name_to_subnet(subrec,name,name_type,(uint16)NB_ACTIVE,PERMANENT_TTL,source,1,&ipaddr);
     }
+    (void)add_name_to_subnet(wins_server_subnet,name,name_type,(uint16)NB_ACTIVE,PERMANENT_TTL,source,1,&ipaddr);
   }
    
   endlmhosts(fp);

Volker

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20030427/fd521b86/attachment.bin


More information about the samba-technical mailing list