[
https://issues.apache.org/jira/browse/CASSANDRA-9309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14619130#comment-14619130
]
Yuki Morishita edited comment on CASSANDRA-9309 at 7/8/15 6:41 PM:
-------------------------------------------------------------------
Thanks for the catch.
I think you're right.
CASSANDRA-3839 is the original JIRA that introduced
{{Config#getOutboundBindAny}}, and when CASSANDRA-4297 was introduced the
behavior got changed.
was (Author: yukim):
Thanks for the catch.
I think you're right.
CASSANDRA-3839 is the original JIRA that introduced
{{Config#getOutboundBindAny}}, and somehow it got changed.
> Wrong interpretation of Config.getOutboundBindAny depending on using SSL or
> not
> -------------------------------------------------------------------------------
>
> Key: CASSANDRA-9309
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9309
> Project: Cassandra
> Issue Type: Bug
> Reporter: Casey Marshall
> Assignee: Yuki Morishita
>
> In function OutboundTcpConnectionPool.newSocket(), it appears the binding
> behavior of client sockets is different depending on the encryption setting.
> If encryption is enabled, and Config.getOutboundBindAny() is true, then no
> address is passed to SSLFactory.getSocket (so I assume it binds to any
> address).
> If encryption is enabled, and Config.getOutboundBindAny() is false, then
> FBUtilities.getLocalAddress() is passed to SSLFactory.getSocket (so I assume
> the new socket will be bound to that address).
> If encryption is disabled, and Config.getOutboundBindAny() is true (and
> socket.isBound() returns false) then the socket is bound to
> FBUtilities.getLocalAddress().
> If encryption is disabled, and Config.getOutboundBindAny() is false, the
> socket is not bound.
> The case of encryption disabled appears to be wrong, and the
> Config.getOutboundBindAny() flag gets inverted depending on the encryption
> setting. Shouldn't
> {code}
> if (Config.getOutboundBindAny() && !socket.isBound())
> {code}
> be this:
> {code}
> if (!Config.getOutboundBindAny() && !socket.isBound())
> {code}
> This is in my copy of the 2.0.11 tag, and appears to be the same in trunk.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)