From 7cc72d19f84698a194bee843af66be9be6179baa Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 7 May 2024 10:08:58 +0200 Subject: utils: reserve the nl_has_capabiliy numbers for releases 3.10 - 3.12 Fix the capability numbers for the next few releases already. While not yet in use, the number is reserved and stable. --- include/netlink/utils.h | 18 ++++++++++++++++++ lib/utils.c | 6 +++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/include/netlink/utils.h b/include/netlink/utils.h index 11a6b931..b3a59516 100644 --- a/include/netlink/utils.h +++ b/include/netlink/utils.h @@ -331,6 +331,24 @@ enum { NL_CAPABILITY_VERSION_3_9_0 = 35, #define NL_CAPABILITY_VERSION_3_9_0 NL_CAPABILITY_VERSION_3_9_0 + /** + * The library version is libnl3 3.10.0 or newer. This capability should never be backported. + */ + NL_CAPABILITY_VERSION_3_10_0 = 36, +#define NL_CAPABILITY_VERSION_3_10_0 NL_CAPABILITY_VERSION_3_10_0 + + /** + * The library version is libnl3 3.11.0 or newer. This capability should never be backported. + */ + NL_CAPABILITY_VERSION_3_11_0 = 37, +#define NL_CAPABILITY_VERSION_3_11_0 NL_CAPABILITY_VERSION_3_11_0 + + /** + * The library version is libnl3 3.12.0 or newer. This capability should never be backported. + */ + NL_CAPABILITY_VERSION_3_12_0 = 38, +#define NL_CAPABILITY_VERSION_3_12_0 NL_CAPABILITY_VERSION_3_12_0 + __NL_CAPABILITY_MAX, NL_CAPABILITY_MAX = (__NL_CAPABILITY_MAX - 1), #define NL_CAPABILITY_MAX NL_CAPABILITY_MAX diff --git a/lib/utils.c b/lib/utils.c index 471cd21a..1d56f1df 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -1283,9 +1283,9 @@ int nl_has_capability (int capability) NL_CAPABILITY_VERSION_3_7_0, NL_CAPABILITY_VERSION_3_8_0, NL_CAPABILITY_VERSION_3_9_0, - 0, - 0, - 0, + 0, /* NL_CAPABILITY_VERSION_3_10_0 */ + 0, /* NL_CAPABILITY_VERSION_3_11_0 */ + 0, /* NL_CAPABILITY_VERSION_3_12_0 */ 0, 0), /* IMPORTANT: these capability numbers are intended to be universal and stable -- cgit v1.2.3