[jcifs] JCIFS ignoring WINS properties and only performing broadcast requests

Michael B Allen miallen at ioplex.com
Wed Jul 11 16:43:30 GMT 2007


On Wed, 11 Jul 2007 16:39:34 +0100
Abhinay Mehta <abhinay at netusage.net> wrote:

> Hi all,
> 
> This is my test code:
> 
> 
>     public static void main(String[] args) {
>        jcifs.Config.setProperty( "jcifs.netbios.wins", "192.168.1.8" );
>        jcifs.Config.setProperty("jcifs.resolveOrder", "WINS,DNS" );
> 
>        try {
>           String hostName = 
> UniAddress.getByName("192.168.1.10").getHostName();
>           System.out.println("Host Name = " + hostName);
>        } catch (UnknownHostException e) {
>           e.printStackTrace();
>        }
>     }
> 
> 
> I am doing TCP DUMP and am seeing that only broadcast requests are being 
> sent, why so?
> 
> I would very much appreciate it if someone could point me in the right 
> direction.
> 
> I was reading UniAddress' source code and noticed that in UniAddress' 
> getByName method there's a method call to isDotQuadIP, and as far as I 
> can see, that method forces all IP address requests to perform broadcast 
> requests. Is that right?

If that's true it sounds like a bug. If BCAST isn't in jcifs.resolveOrder
it should never do broadcast lookups AND if the hostname is an IP it
shouldn't do any lookup at all. I'll add this to The List for checking.

Mike

-- 
Michael B Allen
PHP Active Directory Kerberos SSO
http://www.ioplex.com/


More information about the jcifs mailing list