-
Bug
-
Resolution: Won't Fix
-
P4
-
None
-
8, 11, 17, 18, 19, 20
-
x86_64
-
windows_10
ADDITIONAL SYSTEM INFORMATION :
Windows 10
A DESCRIPTION OF THE PROBLEM :
We have method which used getAttributes method in javax.naming.directory.InitialDirContext to resolve DNS records.
env.put("java.naming.factory.initial", "com.sun.jndi.dns.DnsContextFactory");
InitialDirContext context = new InitialDirContext(env);
Attributes attributes = context.getAttributes(hostname, new String[] {"TXT"});
This code goes to com.sun.jndi.dns.DNSDatagramSocketFactory#open to open new datagram socket.
This method had two ways for socket creation:
com.sun.jndi.dns.DNSDatagramSocketFactory#openDefault
com.sun.jndi.dns.DNSDatagramSocketFactory#openRandom
For the first few requests, the open method uses openDefault and don't trigger firewall alerts but on the fourth call (in my case) for some reason openDefault returns a not suitable port and the method switch to openRandom for socket creation. openRandom uses s.bind(new InetSocketAddress(port)) and this call trigger firewall alert.
It seems for me that it is bug that you create a socket address where the IP address is the wildcard address 0.0.0.0
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Windows firewall is not triggered by calling openRandom method
ACTUAL -
Windows firewall is triggered by calling openRandom method
FREQUENCY : always
Windows 10
A DESCRIPTION OF THE PROBLEM :
We have method which used getAttributes method in javax.naming.directory.InitialDirContext to resolve DNS records.
env.put("java.naming.factory.initial", "com.sun.jndi.dns.DnsContextFactory");
InitialDirContext context = new InitialDirContext(env);
Attributes attributes = context.getAttributes(hostname, new String[] {"TXT"});
This code goes to com.sun.jndi.dns.DNSDatagramSocketFactory#open to open new datagram socket.
This method had two ways for socket creation:
com.sun.jndi.dns.DNSDatagramSocketFactory#openDefault
com.sun.jndi.dns.DNSDatagramSocketFactory#openRandom
For the first few requests, the open method uses openDefault and don't trigger firewall alerts but on the fourth call (in my case) for some reason openDefault returns a not suitable port and the method switch to openRandom for socket creation. openRandom uses s.bind(new InetSocketAddress(port)) and this call trigger firewall alert.
It seems for me that it is bug that you create a socket address where the IP address is the wildcard address 0.0.0.0
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Windows firewall is not triggered by calling openRandom method
ACTUAL -
Windows firewall is triggered by calling openRandom method
FREQUENCY : always