From: Jonathan Rajotte Date: Fri, 27 Apr 2018 19:44:19 +0000 (-0400) Subject: Fix: relayd protocol field present from minor 8 is not checked X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=commitdiff_plain;h=81df238b20240625273053712b8739393422ff68 Fix: relayd protocol field present from minor 8 is not checked Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-relayd/main.c b/src/bin/lttng-relayd/main.c index cf6d8ba23..a31287380 100644 --- a/src/bin/lttng-relayd/main.c +++ b/src/bin/lttng-relayd/main.c @@ -2242,8 +2242,12 @@ static int relay_recv_index(const struct lttcomm_relayd_hdr *recv_hdr, index_info.timestamp_end = be64toh(index_info.timestamp_end); index_info.events_discarded = be64toh(index_info.events_discarded); index_info.stream_id = be64toh(index_info.stream_id); - index_info.stream_instance_id = be64toh(index_info.stream_instance_id); - index_info.packet_seq_num = be64toh(index_info.packet_seq_num); + + if (conn->minor >= 8) { + index_info.stream_instance_id = + be64toh(index_info.stream_instance_id); + index_info.packet_seq_num = be64toh(index_info.packet_seq_num); + } stream = stream_get_by_id(index_info.relay_stream_id); if (!stream) {