[jboss-jira] [JBoss JIRA] (AS7-5359) CLONE - Config XML with <interface ...><any-ipv4-address /></interface> + -Djava.net.preferIPv4Stack=false produces binding to ANY address (error)
Brian Stansberry (JIRA)
jira-events at lists.jboss.org
Tue Sep 11 13:26:33 EDT 2012
[ https://issues.jboss.org/browse/AS7-5359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12717623#comment-12717623 ]
Brian Stansberry commented on AS7-5359:
---------------------------------------
AFAICT in the absence of -Djava.net.preferIPv4Stack=true there is no way to tell the VM to bind a socket to all IPv4 addresses, but only to IPv4 addresses.
So, all we can is check when we see this <any-ipv4-address/> and fail if we don't see -Djava.net.preferIPv4Stack=true.
But, testing on Windows shows that this problem doesn't exist there, which makes my proposed fix problematic; i.e. rejecting <any-ipv4-address/> without a corresponding -Djava.net.preferIPv4Stack=true would break things on Windows.
The <any-ipv4-address/> and <any-ipv6-address/> config elements basically don't have any value, since in the end the behavior we'll support will be what <any-address/> plus the -Djava.net.preferIPv4Stack specifies. So those elements will likely be removed in AS 8.
> CLONE - Config XML with <interface ...><any-ipv4-address /></interface> + -Djava.net.preferIPv4Stack=false produces binding to ANY address (error)
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: AS7-5359
> URL: https://issues.jboss.org/browse/AS7-5359
> Project: Application Server 7
> Issue Type: Bug
> Components: Domain Management
> Affects Versions: 7.1.2.Final (EAP)
> Reporter: Pavel Janousek
> Assignee: Brian Stansberry
> Fix For: 7.2.0.Alpha1
>
>
> The same situation is with every shipped and supported configuration/profile. As base for my explanation I'm using standalone.xml. Standalone.xml declares xmlns as:
> {code}
> <server xmlns="urn:jboss:domain:1.3">
> {code}
> The real XSD file which defined elements is jboss-eap-6.0/docs/schema/jboss-as-config_1_3.xsd.
> The very common Linux system has implemented and enabled dualstack in these days. If we instruct AS instance to bind to +any+ IPv4 address via {code}<interface name="public">
> <any-ipv4-address />
> </interface>{code}
> The real result is to bind running AS instance to +any+ IP address, not only in IPv4 address space but in IPv6 too!
> With default setting (= -Djava.net.preferIPv4Stack=true), result is correct - it is bound to ANY IPv4 addresses only.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list