[svn] commit: r284 - /branches/f2f200910/src/bin/msgq/msgq.c

BIND 10 source code commits bind10-changes at lists.isc.org
Sat Oct 31 20:20:32 UTC 2009


Author: jinmei
Date: Sat Oct 31 20:20:32 2009
New Revision: 284

Log:
make sure binding listening sockets to specific addresses.
previously msgq accepts connection from any address, which is not good.

Modified:
    branches/f2f200910/src/bin/msgq/msgq.c

Modified: branches/f2f200910/src/bin/msgq/msgq.c
==============================================================================
--- branches/f2f200910/src/bin/msgq/msgq.c (original)
+++ branches/f2f200910/src/bin/msgq/msgq.c Sat Oct 31 20:20:32 2009
@@ -1136,9 +1136,10 @@
 		isc_socket_t *sock;
 		isc_sockaddr_t sa;
 		isc_result_t result;
-
-		isc_sockaddr_any(&sa);
-		isc_sockaddr_setport(&sa, msgq_port);
+		struct in_addr ina;
+
+		RUNTIME_CHECK(inet_pton(AF_INET, addrs[i], &ina) == 1);
+		isc_sockaddr_fromin(&sa, &ina, msgq_port);
 
 		sock = NULL;
 		RUNTIME_CHECK(isc_socket_create(socketmgr,




More information about the bind10-changes mailing list