Fix: relayd protocol field present from minor 8 is not checked
[lttng-tools.git] / src / bin / lttng-relayd / main.c
index cf6d8ba2397178be15ac64da636bd7c9caec6b0c..a312873808d09448bedae6ab9e87344ef0905f5c 100644 (file)
@@ -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) {
This page took 0.023418 seconds and 4 git commands to generate.