[PATCH] namequery: suppress bogus warning "resolve_name: unknown name switch type"
urisimchoni at gmail.com
Tue May 12 21:55:58 MDT 2015
This patch fixes a warning that gets issued if NBT name resolving
methods are attempted on a name that cannot be an NBT name (e.g.
longer than 15 characters).
To reproduce this, start with a working setup, then:
1. delete cache files (gencache.tdb and gencache_notrans.tdb)
2. shut down your DNS or point your machine to a bogus DNS
3. do a "net ads testjoin"
The reason we get there in the first place seems to be that fallback
to NBT resolving is broken - when ads_find_dc() fails to get a DC for
some.fqdn.com, it tries nbt resolving on some.fqdn.com which spurs
this message. The correct behavior should IMHO be to resolve the
domain flat name using NBT. But there's also fallback to site-less DNS
lookup, so I think the correct order would be:
2. site-less (if the first one indeed was site-aware, and if the
failure was negative response, as opposed to non-responsive dns)
3. nbt loopkup on domain flat name (if nbt is not disabled)
So there's the review of this patch but the other issue to fix is the
fallback logic in ads_find_dc() - any comments on that will be
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3851 bytes
Desc: not available
More information about the samba-technical