Update to 3.2.29-rc1

This commit is contained in:
Thomas Haller 2016-12-12 22:20:13 +01:00
parent a5dbbb061f
commit 7999874a14
4 changed files with 10 additions and 111 deletions

2
.gitignore vendored
View File

@ -25,3 +25,5 @@
/libnl-doc-3.2.28-rc1.tar.gz
/libnl-3.2.28.tar.gz
/libnl-doc-3.2.28.tar.gz
/libnl-3.2.29-rc1.tar.gz
/libnl-doc-3.2.29-rc1.tar.gz

View File

@ -1,103 +0,0 @@
From 39f7d88425b0c4a9bef1b6adec7e5f8e1dc2055e Mon Sep 17 00:00:00 2001
From: Tobias Jungel <tobias.jungel@bisdn.de>
Date: Thu, 4 Aug 2016 10:01:43 +0200
Subject: [PATCH 1/2] route/addr: address attributes based on object
addr_id_attrs_get returned a fixed set of attributes for AF_INET. This
leads to an invalid cache in case the default cache manager is used.
The error was cause by nl_object_identical, which checkes the ce_mask
of an object against the req_attrs. For route/addr objects the ce_mask
may contain the ADDR_ATTR_PEER, but the addr_id_attrs_get always
includes this attribute. Thus nl_object_identical fails always in case
no peer exists, which is the default for local addresses.
Fixes: 83e851ca9c842ccb6dae411d3fff9c7e9561269a
https://github.com/thom311/libnl/pull/105
Signed-off-by: Thomas Haller <thaller@redhat.com>
(cherry picked from commit dfaba51b5b2b5ad7e3c4990c2af3f30acbe5f8d9)
---
lib/route/addr.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/lib/route/addr.c b/lib/route/addr.c
index b699c64..7d3ff39 100644
--- a/lib/route/addr.c
+++ b/lib/route/addr.c
@@ -467,12 +467,15 @@ static void addr_dump_stats(struct nl_object *obj, struct nl_dump_params *p)
static uint32_t addr_id_attrs_get(struct nl_object *obj)
{
struct rtnl_addr *addr = (struct rtnl_addr *)obj;
+ uint32_t rv;
switch (addr->a_family) {
case AF_INET:
- return (ADDR_ATTR_FAMILY | ADDR_ATTR_IFINDEX |
- ADDR_ATTR_LOCAL | ADDR_ATTR_PREFIXLEN |
- ADDR_ATTR_PEER);
+ rv = (ADDR_ATTR_FAMILY | ADDR_ATTR_IFINDEX |
+ ADDR_ATTR_LOCAL | ADDR_ATTR_PREFIXLEN);
+ if (addr->a_peer)
+ rv |= ADDR_ATTR_PEER;
+ return rv;
case AF_INET6:
return (ADDR_ATTR_FAMILY | ADDR_ATTR_IFINDEX |
ADDR_ATTR_LOCAL);
--
2.7.4
From f4fe5e0a570fb2ec67cbf9e17206deef542c6490 Mon Sep 17 00:00:00 2001
From: Thomas Haller <thaller@redhat.com>
Date: Sun, 14 Aug 2016 11:05:48 +0200
Subject: [PATCH 2/2] 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 <thaller@redhat.com>
(cherry picked from commit 99b1d8acf87bcb35efed49f412d54af682bf1738)
---
include/netlink/utils.h | 7 +++++++
lib/utils.c | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
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 3399c03..0f2a252 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,
--
2.7.4

View File

@ -1,18 +1,16 @@
Name: libnl3
Version: 3.2.28
Release: 3%{?dist}
Version: 3.2.29
Release: 0.1%{?dist}
Summary: Convenience library for kernel netlink sockets
Group: Development/Libraries
License: LGPLv2
URL: http://www.infradead.org/~tgr/libnl/
%define fullversion %{version}
%define fullversion %{version}-rc1
Source: http://www.infradead.org/~tgr/libnl/files/libnl-%{fullversion}.tar.gz
Source1: http://www.infradead.org/~tgr/libnl/files/libnl-doc-%{fullversion}.tar.gz
Patch1: 0001-compare-v4-addr-rh1370526.patch
BuildRequires: flex bison
BuildRequires: python
BuildRequires: libtool autoconf automake
@ -70,7 +68,6 @@ Python 3 bindings for libnl3
%prep
%setup -q -n libnl-%{fullversion}
%patch1 -p1
tar -xzf %SOURCE1
@ -151,6 +148,9 @@ popd
%{python3_sitearch}/netlink-*.egg-info
%changelog
* Mon Dec 12 2016 Thomas Haller <thaller@redhat.com> - 3.2.29-0.1
- Update to 3.2.29-rc1
* Fri Aug 26 2016 Thomas Haller <thaller@redhat.com> - 3.2.28-3
- route: fix nl_object_identical() comparing AF_INET addresses (rh #1370526)

View File

@ -1,2 +1,2 @@
bab12db1eb94a42129f712a44be91a67 libnl-3.2.28.tar.gz
403799b1aa950e51db957033adc8f30d libnl-doc-3.2.28.tar.gz
SHA512 (libnl-3.2.29-rc1.tar.gz) = 8b00896452feba58748aaba5e84dc0b79f336fb1aaf3f309f619d5567c30c81dc6a00cb81003c30f3633bdaffaf39371a9833cca5fa3402f754c5509a4d4b52f
SHA512 (libnl-doc-3.2.29-rc1.tar.gz) = 426afc6beaa58f23dfd0591546a73df2d30c181487d37ab886eac6610f7b940fc929d9fd53b76e64a60797f39a083956d6592fcda5517f4b089f9282a938e0d7