From: Christian Babeux Date: Fri, 10 Aug 2012 17:22:51 +0000 (-0400) Subject: Fix: Off by one in lttcomm_sock_domain enum X-Git-Tag: v2.1.0-rc1~33 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=01d0a631703bd1249ed3ef3e2b1f523f31e08852;p=lttng-tools.git Fix: Off by one in lttcomm_sock_domain enum 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 Signed-off-by: David Goulet --- diff --git a/src/common/sessiond-comm/sessiond-comm.h b/src/common/sessiond-comm/sessiond-comm.h index aebe30c6a..8d1400cdb 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 {