You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by br...@apache.org on 2013/09/25 17:09:37 UTC
[2/6] git commit: Throw an error when listen_address is 0.0.0.0 Patch
by brandonwilliams, reviewed by dbrosius for CASSANDRA-5865
Throw an error when listen_address is 0.0.0.0
Patch by brandonwilliams, reviewed by dbrosius for CASSANDRA-5865
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/25926d09
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/25926d09
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/25926d09
Branch: refs/heads/cassandra-2.0
Commit: 25926d0946ff04243dab6876dcdd76b05c57e472
Parents: ed9d11a
Author: Brandon Williams <br...@apache.org>
Authored: Wed Sep 25 09:58:48 2013 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Wed Sep 25 09:58:48 2013 -0500
----------------------------------------------------------------------
src/java/org/apache/cassandra/config/DatabaseDescriptor.java | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25926d09/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index 2c999ef..633ea9a 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -291,6 +291,9 @@ public class DatabaseDescriptor
/* Local IP or hostname to bind services to */
if (conf.listen_address != null)
{
+ if (conf.listen_address.equals("0.0.0.0"))
+ throw new ConfigurationException("listen_address cannot be 0.0.0.0!");
+
try
{
listenAddress = InetAddress.getByName(conf.listen_address);