Fix: relayd protocol field present from minor 8 is not checked
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Fri, 27 Apr 2018 19:44:19 +0000 (15:44 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 27 Apr 2018 19:44:19 +0000 (15:44 -0400)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
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.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) {
 
        stream = stream_get_by_id(index_info.relay_stream_id);
        if (!stream) {
This page took 0.02717 seconds and 4 git commands to generate.