summaryrefslogtreecommitdiff
path: root/source3/nmbd/nmbd_mynames.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-01-16 19:23:05 +0000
committerJeremy Allison <jra@samba.org>2002-01-16 19:23:05 +0000
commit24bdb14564c7b18bb6f93dc9ec53526bfda2c194 (patch)
tree5006751700aa51dbf6bbe9c52aed9a18f61c6711 /source3/nmbd/nmbd_mynames.c
parent493e6e6f47b020f12ec45dd106d8f1fa6e2f9636 (diff)
downloadsamba-24bdb14564c7b18bb6f93dc9ec53526bfda2c194.tar.gz
samba-24bdb14564c7b18bb6f93dc9ec53526bfda2c194.tar.bz2
samba-24bdb14564c7b18bb6f93dc9ec53526bfda2c194.zip
Fix name register bug with non-existent wins server.
Jeremy. (This used to be commit 4e41780c21d9a6c056104f952e720a79c830c65e)
Diffstat (limited to 'source3/nmbd/nmbd_mynames.c')
-rw-r--r--source3/nmbd/nmbd_mynames.c61
1 files changed, 29 insertions, 32 deletions
diff --git a/source3/nmbd/nmbd_mynames.c b/source3/nmbd/nmbd_mynames.c
index 7f9a3441a8..b1b3f48b62 100644
--- a/source3/nmbd/nmbd_mynames.c
+++ b/source3/nmbd/nmbd_mynames.c
@@ -98,53 +98,50 @@ BOOL register_my_workgroup_and_names(void)
register_my_workgroup_one_subnet(subrec);
}
- /* If we are not a WINS client, we still need to add the magic Samba
+ /* We still need to add the magic Samba
names and the netbios names to the unicast subnet directly. This is
to allow unicast node status requests and queries to still work
in a broadcast only environment. */
- if(we_are_a_wins_client() == False)
- {
- add_samba_names_to_subnet(unicast_subnet);
+ add_samba_names_to_subnet(unicast_subnet);
- for (i=0; my_netbios_names[i]; i++)
+ for (i=0; my_netbios_names[i]; i++)
+ {
+ for(subrec = FIRST_SUBNET; subrec; subrec = NEXT_SUBNET_EXCLUDING_UNICAST(subrec))
{
- for(subrec = FIRST_SUBNET; subrec; subrec = NEXT_SUBNET_EXCLUDING_UNICAST(subrec))
- {
- /*
- * Ensure all the IP addresses are added if we are multihomed.
- */
- struct nmb_name nmbname;
+ /*
+ * Ensure all the IP addresses are added if we are multihomed.
+ */
+ struct nmb_name nmbname;
- make_nmb_name(&nmbname, my_netbios_names[i],0x20);
- insert_permanent_name_into_unicast(subrec, &nmbname, samba_nb_type);
+ make_nmb_name(&nmbname, my_netbios_names[i],0x20);
+ insert_permanent_name_into_unicast(subrec, &nmbname, samba_nb_type);
- make_nmb_name(&nmbname, my_netbios_names[i],0x3);
- insert_permanent_name_into_unicast(subrec, &nmbname, samba_nb_type);
+ make_nmb_name(&nmbname, my_netbios_names[i],0x3);
+ insert_permanent_name_into_unicast(subrec, &nmbname, samba_nb_type);
- make_nmb_name(&nmbname, my_netbios_names[i],0x0);
- insert_permanent_name_into_unicast(subrec, &nmbname, samba_nb_type);
- }
+ make_nmb_name(&nmbname, my_netbios_names[i],0x0);
+ insert_permanent_name_into_unicast(subrec, &nmbname, samba_nb_type);
}
+ }
+ /*
+ * Add the WORKGROUP<0> and WORKGROUP<1e> group names to the unicast subnet
+ * also for the same reasons.
+ */
+
+ for(subrec = FIRST_SUBNET; subrec; subrec = NEXT_SUBNET_EXCLUDING_UNICAST(subrec))
+ {
/*
- * Add the WORKGROUP<0> and WORKGROUP<1e> group names to the unicast subnet
- * also for the same reasons.
+ * Ensure all the IP addresses are added if we are multihomed.
*/
+ struct nmb_name nmbname;
- for(subrec = FIRST_SUBNET; subrec; subrec = NEXT_SUBNET_EXCLUDING_UNICAST(subrec))
- {
- /*
- * Ensure all the IP addresses are added if we are multihomed.
- */
- struct nmb_name nmbname;
+ make_nmb_name(&nmbname, global_myworkgroup, 0x0);
+ insert_permanent_name_into_unicast(subrec, &nmbname, samba_nb_type|NB_GROUP);
- make_nmb_name(&nmbname, global_myworkgroup, 0x0);
- insert_permanent_name_into_unicast(subrec, &nmbname, samba_nb_type|NB_GROUP);
-
- make_nmb_name(&nmbname, global_myworkgroup, 0x1e);
- insert_permanent_name_into_unicast(subrec, &nmbname, samba_nb_type|NB_GROUP);
- }
+ make_nmb_name(&nmbname, global_myworkgroup, 0x1e);
+ insert_permanent_name_into_unicast(subrec, &nmbname, samba_nb_type|NB_GROUP);
}
/*