From: Thomas Haller Date: Sun, 14 Aug 2016 09:05:48 +0000 (+0200) Subject: lib: capability NL_CAPABILITY_RTNL_ADDR_PEER_ID_FIX for ID comparison of v4 addresses X-Git-Tag: libnl3_2_29rc1~23^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=99b1d8acf87bcb35efed49f412d54af682bf1738;p=libnl lib: capability NL_CAPABILITY_RTNL_ADDR_PEER_ID_FIX for ID comparison of v4 addresses The ID attributes for IPv4 addresses were broken which causes wrong nl_object_identical() and cache lookup. This capability shall indicate that the bug was fixed. Signed-off-by: Thomas Haller --- diff --git a/include/netlink/utils.h b/include/netlink/utils.h index 3b10340..1115bb4 100644 --- a/include/netlink/utils.h +++ b/include/netlink/utils.h @@ -217,6 +217,13 @@ enum { NL_CAPABILITY_VERSION_3_2_28 = 19, #define NL_CAPABILITY_VERSION_3_2_28 NL_CAPABILITY_VERSION_3_2_28 + /** + * After NL_CAPABILITY_RTNL_ADDR_PEER_FIX, a follow up regression to lookup + * IPv4 addresses in the cache was fixed (PR#105). + */ + NL_CAPABILITY_RTNL_ADDR_PEER_ID_FIX = 20, +#define NL_CAPABILITY_RTNL_ADDR_PEER_ID_FIX NL_CAPABILITY_RTNL_ADDR_PEER_ID_FIX + __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 7bcc251..3e98ab5 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -1164,7 +1164,7 @@ int nl_has_capability (int capability) NL_CAPABILITY_XFRM_SA_KEY_SIZE, NL_CAPABILITY_RTNL_ADDR_PEER_FIX, NL_CAPABILITY_VERSION_3_2_28, - 0, + NL_CAPABILITY_RTNL_ADDR_PEER_ID_FIX, 0, 0, 0,