ABI: refuse non-matching ABI minor version on event registration
[lttng-ust.git] / liblttng-ust-ctl / ustctl.c
index d08e7edca67fa50e4feabb6d6c6d20f99521c66f..62603a268653118ecca4cf56120db41cf4016295 100644 (file)
@@ -1824,6 +1824,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.023258 seconds and 4 git commands to generate.