samba cluster and nmbd
Evgeny Privarotskiy
pea1999 at gmail.com
Sun Jul 19 04:57:40 MDT 2009
Hi,
I tried to use described functionality.
First of all, there is something suspicious in the code. This is from 3.4.0
bool register_my_workgroup_and_names(void)
{
...
if (cluster_addresses) {
int a, n;
unsigned name_types[] = {0x20, 0x3, 0x0};
for (i=0; my_netbios_names(i); i++) {
for(subrec = FIRST_SUBNET; subrec; subrec =
subrec->next) {
for (n=0;n<ARRAY_SIZE(name_types);n++) {
struct name_record *namerec;
struct nmb_name nmbname;
struct in_addr ip;
make_nmb_name(&nmbname,
my_netbios_names(i), name_types[n]);
namerec =
find_name_on_subnet(unicast_subnet, &nmbname, FIND_SELF_NAME);
if (namerec == NULL) continue;
for (a=0;cluster_addresses[a];a++) {
ip =
interpret_addr2(cluster_addresses[a]);
add_ip_to_name_record(namerec, ip);
}
}
}
}
}
The second for(...) iterates variable "subrec". However, "subres" is
never used inside the loop. There are 2 options here: or the loop has
to be removed or "subrec" should be used inside the loop.
The second problem is that "cluster addresses" are not used to reply
on name_query_request. Is it intentionally or there is any problem to
support name_query_request?
Thanks,
Evgeny
More information about the samba-technical
mailing list