diff --git a/src/common/slurm_protocol_api.c b/src/common/slurm_protocol_api.c
index 91b2d1a999922c7b8d24bd490ed9f69fabe3d95a..cecce44fd4dcbc6cf44bd1c9a2c51be5f36bce48 100644
--- a/src/common/slurm_protocol_api.c
+++ b/src/common/slurm_protocol_api.c
@@ -278,8 +278,7 @@ slurm_fd slurm_open_msg_conn(slurm_addr * slurm_address)
 	return _slurm_open_msg_conn(slurm_address);
 }
 
-/* calls connect to make a connection-less datagram connection to the the primary or secondary slurmctld message engine
- * slurm_address 	- for now it is really just a sockaddr_in
+/* calls connect to make a connection-less datagram connection to the primary or secondary slurmctld message engine
  * int			- the return code
  */
 slurm_fd slurm_open_controller_conn()
@@ -301,6 +300,33 @@ slurm_fd slurm_open_controller_conn()
 	return connection_fd;
 }
 
+/* calls connect to make a connection-less datagram connection to the primary or secondary slurmctld message engine
+ * dest 	- controller to contact, 1=primary, 2=secondary
+ * int		- the return code
+ */
+slurm_fd slurm_open_controller_conn_spec (enum controller_id dest)
+{
+	slurm_fd connection_fd;
+	slurm_api_set_default_config();
+
+	if (dest == PRIMARY_CONTROLLER) {
+		if ((connection_fd =
+		     slurm_open_msg_conn(&proto_conf->primary_controller)) ==
+		    SLURM_SOCKET_ERROR)
+			debug("Open connection to primary controller failed: %m");
+	} else if (slurmctld_conf.backup_controller) {
+		if ((connection_fd =
+		     slurm_open_msg_conn(&proto_conf->secondary_controller)) ==
+		    SLURM_SOCKET_ERROR)
+			debug("Open connection to secondary controller failed: %m");
+	} else {
+		debug("No secondary controller to contact");
+		connection_fd = SLURM_SOCKET_ERROR;
+	}
+
+	return connection_fd;
+}
+
 /* In the bsd implmentation maps directly to a accept call 
  * In the mongo it returns the open_fd and is essentially a no-op function call
  * open_fd		- file descriptor to accept connection on
diff --git a/src/common/slurm_protocol_api.h b/src/common/slurm_protocol_api.h
index 233364fb631e35b5096b54078c68ef5c8676b9c0..4805586193e9f490da1f629021ca735cd2f7d3ca 100644
--- a/src/common/slurm_protocol_api.h
+++ b/src/common/slurm_protocol_api.h
@@ -23,6 +23,10 @@
 #include <src/common/slurm_protocol_defs.h>
 #include <src/common/slurm_errno.h>
 
+enum controller_id {
+PRIMARY_CONTROLLER   = 1,
+SECONDARY_CONTROLLER = 2 };
+
 /*****************************/
 /* configuration functions   */
 /*****************************/
@@ -142,10 +146,13 @@ int slurm_send_node_msg ( slurm_fd open_fd , slurm_msg_t * msg ) ;
 /* msg connection establishment functions used by msg clients         */
 /**********************************************************************/
 
-/* calls connect to make a connection-less datagram connection to the the primary or secondary slurmctld message engine
- * RET slurm_fd		- file descriptor of the connection created
+/* calls connect to make a connection-less datagram connection to the primary or 
+ * secondary slurmctld message engine
+ * RET slurm_fd	- file descriptor of the connection created
+ * dest 	- controller to contact, primary or secondary
  */
 slurm_fd inline slurm_open_controller_conn ( ) ;
+slurm_fd inline slurm_open_controller_conn_spec ( enum controller_id dest ) ;
 
 /* In the bsd socket implementation it creates a SOCK_STREAM socket and calls connect on it
  * In the mongo implementation it creates a SOCK_DGRAM socket and calls connect on it
diff --git a/src/common/slurm_protocol_defs.h b/src/common/slurm_protocol_defs.h
index 38d241ee89d37a9ef1c69c0ca6ad6162bd9d28ee..247ca108845f2551b56477edf688b56ee4325eb1 100644
--- a/src/common/slurm_protocol_defs.h
+++ b/src/common/slurm_protocol_defs.h
@@ -109,6 +109,7 @@ typedef enum {
 	REQUEST_SHUTDOWN_IMMEDIATE,
 	RESPONSE_SHUTDOWN,
 	REQUEST_PING,
+	REQUEST_CONTROL,
 
 	REQUEST_BUILD_INFO = 2001,
 	RESPONSE_BUILD_INFO,
diff --git a/src/common/slurm_protocol_pack.c b/src/common/slurm_protocol_pack.c
index 904c9e5c7f38e72d4820464c0e9df0ca0acea08c..ca0462bca81d00251e21c5f33b2009b5459a8888 100644
--- a/src/common/slurm_protocol_pack.c
+++ b/src/common/slurm_protocol_pack.c
@@ -148,6 +148,7 @@ int pack_msg ( slurm_msg_t const * msg , Buf buffer )
 		case REQUEST_RECONFIGURE :
 		case REQUEST_SHUTDOWN_IMMEDIATE :
 		case REQUEST_PING :
+		case REQUEST_CONTROL :
 			/* Message contains no body/information */
 			break ;
 		case REQUEST_SHUTDOWN :
@@ -297,6 +298,7 @@ int unpack_msg ( slurm_msg_t * msg , Buf buffer )
 		case REQUEST_RECONFIGURE :
 		case REQUEST_SHUTDOWN_IMMEDIATE :
 		case REQUEST_PING :
+		case REQUEST_CONTROL :
 			/* Message contains no body/information */
 			break ;
 		case REQUEST_SHUTDOWN :
diff --git a/src/common/slurm_protocol_socket_implementation.c b/src/common/slurm_protocol_socket_implementation.c
index 245212014cf5b4039766f5634757a9e08f72235b..901eef9c44bd9ad73879a1a958efee78eb55b7cf 100644
--- a/src/common/slurm_protocol_socket_implementation.c
+++ b/src/common/slurm_protocol_socket_implementation.c
@@ -491,6 +491,14 @@ slurm_fd _slurm_open_stream ( slurm_addr * slurm_address )
 {
 	int rc ;
 	slurm_fd connection_fd ;
+
+	if ( (slurm_address->sin_family == 0) &&
+	     (slurm_address->sin_port == 0) ) 
+	{
+		error ( "Attempt to open socket with null address" );
+		return SLURM_SOCKET_ERROR;
+	}
+
 	if ( ( connection_fd =_slurm_create_socket ( SLURM_STREAM ) ) == SLURM_SOCKET_ERROR )
 	{
 		debug ( "Error creating slurm stream socket: %m" ) ;
@@ -774,19 +782,21 @@ void _slurm_set_addr ( slurm_addr * slurm_address , uint16_t port , char * host
 }
 void _slurm_set_addr_char ( slurm_addr * slurm_address , uint16_t port , char * host )
 {
-	struct hostent * host_info; 
-	if (host != NULL) {
+	struct hostent * host_info = NULL; 
+
+	if (host != NULL)
 		host_info = gethostbyname ( host ) ;
-		if (host_info == NULL) {
-			error ("gethostbyname failure on %s", host);
-			slurm_address->sin_family = 0;
-			slurm_address->sin_port = 0;
-		}
+
+	if (host_info == NULL) {
+		error ("gethostbyname failure on %s", host);
+		slurm_address->sin_family = 0;
+		slurm_address->sin_port = 0;
+	} else {
 		memcpy ( & slurm_address -> sin_addr . s_addr , 
 			host_info -> h_addr , host_info -> h_length ) ;
+		slurm_address -> sin_family = AF_SLURM ;
+		slurm_address -> sin_port = htons ( port ) ;
 	}
-	slurm_address -> sin_family = AF_SLURM ;
-	slurm_address -> sin_port = htons ( port ) ;
 }
 
 void _slurm_get_addr ( slurm_addr * slurm_address , uint16_t * port , char * host , unsigned int buf_len )