Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8B7C3184CF for ; Thu, 19 Nov 2015 10:28:11 +0000 (UTC) Received: (qmail 78044 invoked by uid 500); 19 Nov 2015 10:28:11 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 77986 invoked by uid 500); 19 Nov 2015 10:28:11 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 77750 invoked by uid 99); 19 Nov 2015 10:28:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Nov 2015 10:28:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 270A32C1F6E for ; Thu, 19 Nov 2015 10:28:11 +0000 (UTC) Date: Thu, 19 Nov 2015 10:28:11 +0000 (UTC) From: "Robert Stupp (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-9309) Wrong interpretation of Config.getOutboundBindAny depending on using SSL or not MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-9309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15013295#comment-15013295 ] Robert Stupp commented on CASSANDRA-9309: ----------------------------------------- Code change is simple and LGTM - +1 to commit against 2.1...trunk. > 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 > Components: Streaming and Messaging > Reporter: Casey Marshall > Assignee: Yuki Morishita > Fix For: 2.1.x, 2.2.x, 3.x > > > 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)