]> granicus.if.org Git - apache/commitdiff
initialize the protocol field when manufacturing an apr socket
authorJeff Trawick <trawick@apache.org>
Tue, 31 Jul 2012 23:19:56 +0000 (23:19 +0000)
committerJeff Trawick <trawick@apache.org>
Tue, 31 Jul 2012 23:19:56 +0000 (23:19 +0000)
lest accidential autodata contents leak into the apr_socket_t

(this doesn't address any known problem symptom)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1367819 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/winnt/child.c

index 0b52775414f1c8385ee32347bb67c14519f82b52..f55ab11140315f992accc224bcd006624d12dad6 100644 (file)
@@ -686,11 +686,12 @@ reinit: /* target of data or connect upon too many AcceptEx failures */
             }
         }
 
-        sockinfo.os_sock = &context->accept_socket;
-        sockinfo.local   = context->sa_server;
-        sockinfo.remote  = context->sa_client;
-        sockinfo.family  = context->sa_server->sa_family;
-        sockinfo.type    = SOCK_STREAM;
+        sockinfo.os_sock  = &context->accept_socket;
+        sockinfo.local    = context->sa_server;
+        sockinfo.remote   = context->sa_client;
+        sockinfo.family   = context->sa_server->sa_family;
+        sockinfo.type     = SOCK_STREAM;
+        sockinfo.protocol = IPPROTO_TCP;
         /* Restore the state corresponding to apr_os_sock_make's default
          * assumption of timeout -1 (really, a flaw of os_sock_make and
          * os_sock_put that it does not query to determine ->timeout).