ABI: refuse non-matching ABI minor version on event registration
[lttng-ust.git] / liblttng-ust-ctl / ustctl.c
index 6b6f295b38bd81ff4ce3e26ad47f7ea37c351fc0..5a7fa61fa17064be30a524a3c8dd04c28b7c1da6 100644 (file)
@@ -1737,6 +1737,17 @@ int ustctl_recv_reg_msg(int sock,
                return -LTTNG_UST_ERR_UNSUP_MAJOR;
        }
 
+       /*
+        * Addition of enumeration inside _ustclt_basic_type should have been
+        * marked as a breaking ABI change since it blows past the included
+        * padding hence result in bigger than expected struct. Refuse
+        * registration for non-matching minor version since only two minor
+        * versions exist for ust-2.7(6.0) and 2.8(6.1).
+        */
+       if (reg_msg.minor != LTTNG_UST_ABI_MINOR_VERSION) {
+               return -LTTNG_UST_ERR_UNSUP_MAJOR;
+       }
+
        return 0;
 }
 
This page took 0.023913 seconds and 4 git commands to generate.