]> granicus.if.org Git - libnl/commitdiff
lib: capability NL_CAPABILITY_RTNL_ADDR_PEER_ID_FIX for ID comparison of v4 addresses
authorThomas Haller <thaller@redhat.com>
Sun, 14 Aug 2016 09:05:48 +0000 (11:05 +0200)
committerThomas Haller <thaller@redhat.com>
Sun, 14 Aug 2016 09:07:01 +0000 (11:07 +0200)
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 <thaller@redhat.com>
include/netlink/utils.h
lib/utils.c

index 3b10340d73bd8f41f2fdefc7690e6858218007ab..1115bb4355d1368556e2e36e46b820adddae0bd1 100644 (file)
@@ -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
index 7bcc25136c3d0ed2a153c0074ead47b07bf2bf37..3e98ab5d172af35cd923b7fccc22b0d036e11887 100644 (file)
@@ -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,