From 363b9a2739e9e39d1f69625e6647c6c9047a901a Mon Sep 17 00:00:00 2001 From: Samba Release Account Date: Thu, 31 Jul 1997 18:47:26 +0000 Subject: loadparm.c: Added new netbios aliases parameter (code from Cisco) nameannounce.c: Code to announce aliases as well as our own names. namedbsubnet.c: Code to add the aliases to the server list. nameserv.c: Code to defend our aliases on the namelist. namework.c: Code to check it's one of our aliases. nmbd.c: Code to initialise the aliases. proto.h: Fixup protos. util.c: Code to check it's one of our aliases. All above code based on code for 1.9.16p11 donated by Cisco from Ben Woodard Jeremy (jallison@whistle.com) (This used to be commit a2ce1c0cb1331551ff728dcfe3260fab4cd827e5) --- source3/nameserv.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'source3/nameserv.c') diff --git a/source3/nameserv.c b/source3/nameserv.c index abad9b28c2..96bb1c0eac 100644 --- a/source3/nameserv.c +++ b/source3/nameserv.c @@ -38,6 +38,7 @@ extern int DEBUGLEVEL; extern pstring scope; extern pstring myname; extern fstring myworkgroup; +extern char **my_netbios_names; extern struct in_addr ipzero; extern struct in_addr wins_ip; @@ -366,11 +367,16 @@ void add_my_names(void) for (d = FIRST_SUBNET; d; d = NEXT_SUBNET_INCLUDING_WINS(d)) { + int n; BOOL wins = (lp_wins_support() && (d == wins_subnet)); - add_my_name_entry(d, myname,0x20,nb_type|NB_ACTIVE); - add_my_name_entry(d, myname,0x03,nb_type|NB_ACTIVE); - add_my_name_entry(d, myname,0x00,nb_type|NB_ACTIVE); + /* Add all our names including aliases. */ + for (n=0; my_netbios_names[n]; n++) + { + add_my_name_entry(d, my_netbios_names[n],0x20,nb_type|NB_ACTIVE); + add_my_name_entry(d, my_netbios_names[n],0x03,nb_type|NB_ACTIVE); + add_my_name_entry(d, my_netbios_names[n],0x00,nb_type|NB_ACTIVE); + } /* these names are added permanently (ttl of zero) and will NOT be refreshed with the WINS server */ -- cgit