Bug 4177 - brodcast to search NTDomain
Summary: brodcast to search NTDomain
Status: NEW
Alias: None
Product: jCIFS
Classification: Unclassified
Component: core (show other bugs)
Version: 1.2
Hardware: Other Windows 2000
: P3 normal
Target Milestone: ---
Assignee: Samba Bugzilla Account
QA Contact:
Depends on:
Reported: 2006-10-17 17:47 UTC by Hanfeng Cui (jack)
Modified: 2009-04-13 08:15 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Hanfeng Cui (jack) 2006-10-17 17:47:23 UTC
A. when try to search a NT Domain address without jcifs.prp:

UniAddress dc = UniAddress.getByName( "WINNTDOMAINNAME" ,true);

it does not send any DatagramPacket to destination IP "".

B. the problem is in ensureOpen(..), laddr= null
    socket = new DatagramSocket( lport, laddr );
  so the   socket.send( out ); will not work.

C. Just add some words in construct of NameServiceClient:
        try {
            baddr = Config.getInetAddress( "jcifs.netbios.baddr",
                        InetAddress.getByName( "" ));
            if (laddr == null) {                       // add this
                laddr = InetAddress.getLocalHost();    // add this
                this.laddr = laddr;                    // add this  
            }                                          // add this
        } catch( UnknownHostException uhe ) {

D. This problem & solution tested in java 1.4.2_06 & 1.5.2_06 in windows 2000 search for NT4.
Comment 1 Michael B. Allen 2006-10-17 18:20:20 UTC
Ok. I'll add this to The List for investigation. This behavior could be due related to oddity wrt Java and hosts w/o DNS servers (see "Name Resolution Properties" document on jcifs website).
Comment 2 Michael B. Allen 2006-11-11 21:42:18 UTC
I don't see this problem. When the laddr address is null it uses just fine for me.

The Java API for DatagramSocket suggests that this is legit since laddr being null is basically like an IP address of

  "If the IP address is, the socket will be bound to the wildcard address, an IP address chosen by the kernel."

I suspect the problem has to do with your host network setup or the Java implementation you're using.
Comment 3 Gerald (Jerry) Carter (dead mail address) 2009-04-13 08:15:07 UTC
Reassigning since current assignee mail addr is bouncing