summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2024-05-07 10:08:58 +0200
committerThomas Haller <thaller@redhat.com>2024-05-07 10:08:58 +0200
commit7cc72d19f84698a194bee843af66be9be6179baa (patch)
tree38d8eda86daad648c4651ce3f9f0095702f5e575
parent30da51072975cd7733cfee27305f8512b733216e (diff)
downloadlibnl-upstream-main.tar.gz
utils: reserve the nl_has_capabiliy numbers for releases 3.10 - 3.12upstream-main
Fix the capability numbers for the next few releases already. While not yet in use, the number is reserved and stable.
-rw-r--r--include/netlink/utils.h18
-rw-r--r--lib/utils.c6
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