diff --git a/indra/llmessage/lliosocket.cpp b/indra/llmessage/lliosocket.cpp
index b7460df508caec0cdabfd22556c76c1786e35d39..b15b98db806b04ae7204cd2a6c4482a5d0f7b13a 100644
--- a/indra/llmessage/lliosocket.cpp
+++ b/indra/llmessage/lliosocket.cpp
@@ -101,7 +101,7 @@ void ll_debug_socket(const char* msg, apr_socket_t* apr_sock)
 ///
 
 // static
-LLSocket::ptr_t LLSocket::create(apr_pool_t* pool, EType type, U16 port)
+LLSocket::ptr_t LLSocket::create(apr_pool_t* pool, EType type, U16 port, const char *hostname)
 {
 	LLSocket::ptr_t rv;
 	apr_socket_t* socket = NULL;
@@ -150,7 +150,7 @@ LLSocket::ptr_t LLSocket::create(apr_pool_t* pool, EType type, U16 port)
 		apr_sockaddr_t* sa = NULL;
 		status = apr_sockaddr_info_get(
 			&sa,
-			APR_ANYADDR,
+			hostname,
 			APR_UNSPEC,
 			port,
 			0,
diff --git a/indra/llmessage/lliosocket.h b/indra/llmessage/lliosocket.h
index f840f0275c12388e0eff23b8ff26c33b990f74bc..303d80eb142982c40daa1592d865fc06b52e19cd 100644
--- a/indra/llmessage/lliosocket.h
+++ b/indra/llmessage/lliosocket.h
@@ -96,12 +96,14 @@ class LLSocket
 	 * and associated with the socket.
 	 * @param type The type of socket to create
 	 * @param port The port for the socket
+	 * @param hostname e.g. APR_ANYADDR to listen openly, or "127.0.0.1"
 	 * @return A valid socket shared pointer if the call worked.
 	 */
 	static ptr_t create(
 		apr_pool_t* pool,
 		EType type,
-		U16 port = PORT_EPHEMERAL);
+		U16 port = PORT_EPHEMERAL,
+		const char *hostname = APR_ANYADDR);
 
 	/** 
 	 * @brief Create a LLSocket when you already have an apr socket.
diff --git a/indra/test/io.cpp b/indra/test/io.cpp
index ff900ab96bea3840cf497417a7a4114007920597..40243a8ad6ef6505f9f2988db9b2c8dea9d3c6bc 100644
--- a/indra/test/io.cpp
+++ b/indra/test/io.cpp
@@ -914,7 +914,8 @@ namespace tut
 			mSocket = LLSocket::create(
 				mPool,
 				LLSocket::STREAM_TCP,
-				SERVER_LISTEN_PORT);
+				SERVER_LISTEN_PORT,
+				"127.0.0.1");
 		}
 
 		~pipe_and_pump_fitness()