Skip to content

Commit

Permalink
utils: reserve the nl_has_capabiliy numbers for releases 3.10 - 3.12
Browse files Browse the repository at this point in the history
Fix the capability numbers for the next few releases already. While not
yet in use, the number is reserved and stable.
  • Loading branch information
thom311 committed May 7, 2024
1 parent 30da510 commit 7cc72d1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
18 changes: 18 additions & 0 deletions include/netlink/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions lib/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7cc72d1

Please sign in to comment.