[lttng-dev] [PATCH lttng-tools 1/2] Fix: Off by one in lttcomm_sock_domain enum

Christian Babeux christian.babeux at efficios.com
Fri Aug 10 13:22:51 EDT 2012


     The wrong value is used to lookup the socket creation
     function in net_families causing a segfault when using IPv6.

Signed-off-by: Christian Babeux <christian.babeux at efficios.com>
---
 src/common/sessiond-comm/sessiond-comm.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/sessiond-comm/sessiond-comm.h b/src/common/sessiond-comm/sessiond-comm.h
index aebe30c..8d1400c 100644
--- a/src/common/sessiond-comm/sessiond-comm.h
+++ b/src/common/sessiond-comm/sessiond-comm.h
@@ -208,8 +208,8 @@ enum lttcomm_sock_proto {
  * Index in the net_families array below. Please keep in sync!
  */
 enum lttcomm_sock_domain {
-	LTTCOMM_INET      = 1,
-	LTTCOMM_INET6     = 2,
+	LTTCOMM_INET      = 0,
+	LTTCOMM_INET6     = 1,
 };
 
 struct lttcomm_sockaddr {
-- 
1.7.11.4




More information about the lttng-dev mailing list