summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/libnl
diff options
context:
space:
mode:
authorAdrian Dudau <adrian.dudau@enea.com>2014-06-26 14:36:22 +0200
committerAdrian Dudau <adrian.dudau@enea.com>2014-06-26 15:32:53 +0200
commitf4cf9fe05bb3f32fabea4e54dd92d368967a80da (patch)
tree487180fa9866985ea7b28e625651765d86f515c3 /meta/recipes-support/libnl
downloadpoky-f4cf9fe05bb3f32fabea4e54dd92d368967a80da.tar.gz
initial commit for Enea Linux 4.0
Migrated from the internal git server on the daisy-enea branch Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta/recipes-support/libnl')
-rw-r--r--meta/recipes-support/libnl/libnl/0001-fix-double-free-caused-by-freeing-link-af_data-in-rt.patch41
-rw-r--r--meta/recipes-support/libnl/libnl/fix-lib-cache_mngr.c-two-parentheses-bugs.patch37
-rw-r--r--meta/recipes-support/libnl/libnl/fix-pc-file.patch17
-rw-r--r--meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch36
-rw-r--r--meta/recipes-support/libnl/libnl_3.2.22.bb44
5 files changed, 175 insertions, 0 deletions
diff --git a/meta/recipes-support/libnl/libnl/0001-fix-double-free-caused-by-freeing-link-af_data-in-rt.patch b/meta/recipes-support/libnl/libnl/0001-fix-double-free-caused-by-freeing-link-af_data-in-rt.patch
new file mode 100644
index 0000000000..6d2c8ff72d
--- /dev/null
+++ b/meta/recipes-support/libnl/libnl/0001-fix-double-free-caused-by-freeing-link-af_data-in-rt.patch
@@ -0,0 +1,41 @@
1From 6f37b439af7e96104aadd8ec3ae8d3882df8d102 Mon Sep 17 00:00:00 2001
2From: Jiri Pirko <jiri@resnulli.us>
3Date: Wed, 21 Aug 2013 14:40:34 +0200
4Subject: [PATCH] fix double free caused by freeing link af_data in
5 rtnl_link_set_family()
6
7Introduced by commit 8026fe2e3a9089eff3f5a06ee6e3cc78d96334ed ("link:
8Free and realloc af specific data upon rtnl_link_set_family()")
9
10link->l_af_data[link->l_af_ops->ao_family] is freed here but not set to
11zero. That leads to double free made by link_free_data->do_foreach_af.
12
13Fix this by setting link->l_af_data[link->l_af_ops->ao_family] to zero
14rigth after free.
15
16Signed-off-by: Jiri Pirko <jiri@resnulli.us>
17Signed-off-by: Thomas Graf <tgraf@suug.ch>
18---
19 lib/route/link.c | 4 +++-
20 1 file changed, 3 insertions(+), 1 deletion(-)
21
22diff --git a/lib/route/link.c b/lib/route/link.c
23index a73e1db..0bb90a0 100644
24--- a/lib/route/link.c
25+++ b/lib/route/link.c
26@@ -1762,9 +1762,11 @@ void rtnl_link_set_family(struct rtnl_link *link, int family)
27 link->l_family = family;
28 link->ce_mask |= LINK_ATTR_FAMILY;
29
30- if (link->l_af_ops)
31+ if (link->l_af_ops) {
32 af_free(link, link->l_af_ops,
33 link->l_af_data[link->l_af_ops->ao_family], NULL);
34+ link->l_af_data[link->l_af_ops->ao_family] = NULL;
35+ }
36
37 link->l_af_ops = af_lookup_and_alloc(link, family);
38 }
39--
401.8.4
41
diff --git a/meta/recipes-support/libnl/libnl/fix-lib-cache_mngr.c-two-parentheses-bugs.patch b/meta/recipes-support/libnl/libnl/fix-lib-cache_mngr.c-two-parentheses-bugs.patch
new file mode 100644
index 0000000000..22b0d88428
--- /dev/null
+++ b/meta/recipes-support/libnl/libnl/fix-lib-cache_mngr.c-two-parentheses-bugs.patch
@@ -0,0 +1,37 @@
1From 82fdf49c185fd5f3810781af9ef52aa6a52bf2df Mon Sep 17 00:00:00 2001
2From: "Song.Li" <Song.Li@windriver.com>
3Date: Thu, 28 Jun 2012 20:03:17 +0800
4Subject: [PATCH] fix lib/cache_mngr.c two parentheses bugs
5
6there are two parentheses bugs in libnl /lib/cache_mngr.c file.
7The parentheses doesn't make any sense,
8This will cause the variable err get a bool value,
9the correct value of variable err should be the return value
10of the function which can be any integer value.
11
12---
13 lib/cache_mngr.c | 4 ++--
14 1 file changed, 2 insertions(+), 2 deletions(-)
15
16Upstream-Status: Pending
17
18diff --git a/lib/cache_mngr.c b/lib/cache_mngr.c
19index dae8768..57cc1f9 100644
20--- a/lib/cache_mngr.c
21+++ b/lib/cache_mngr.c
22@@ -150,10 +150,10 @@ int nl_cache_mngr_alloc(struct nl_sock *sk, int protocol, int flags,
23 /* Required to receive async event notifications */
24 nl_socket_disable_seq_check(mngr->cm_sock);
25
26- if ((err = nl_connect(mngr->cm_sock, protocol) < 0))
27+ if ((err = nl_connect(mngr->cm_sock, protocol)) < 0)
28 goto errout;
29
30- if ((err = nl_socket_set_nonblocking(mngr->cm_sock) < 0))
31+ if ((err = nl_socket_set_nonblocking(mngr->cm_sock)) < 0)
32 goto errout;
33
34 NL_DBG(1, "Allocated cache manager %p, protocol %d, %d caches\n",
35--
361.7.9.5
37
diff --git a/meta/recipes-support/libnl/libnl/fix-pc-file.patch b/meta/recipes-support/libnl/libnl/fix-pc-file.patch
new file mode 100644
index 0000000000..fe8b833a1c
--- /dev/null
+++ b/meta/recipes-support/libnl/libnl/fix-pc-file.patch
@@ -0,0 +1,17 @@
1Upstream-Status: Pending
2
3Some packages are asking only for libnl-2.0, but expects to get also
4libnl-genl, libnl-nf libnl-route, easiest way to fix them is here.
5
6Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
7Index: libnl-3.2.14/libnl-3.0.pc.in
8===================================================================
9--- libnl-3.2.14.orig/libnl-3.0.pc.in
10+++ libnl-3.2.14/libnl-3.0.pc.in
11@@ -6,5 +6,5 @@ includedir=@includedir@
12 Name: libnl
13 Description: Convenience library for netlink sockets
14 Version: @PACKAGE_VERSION@
15-Libs: -L${libdir} -lnl-@MAJ_VERSION@
16+Libs: -L${libdir} -lnl-@MAJ_VERSION@ -lnl-genl-@MAJ_VERSION@ -lnl-nf-@MAJ_VERSION@ -lnl-route-@MAJ_VERSION@
17 Cflags: -I${includedir}/libnl@MAJ_VERSION@
diff --git a/meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch b/meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch
new file mode 100644
index 0000000000..b93d97b1b7
--- /dev/null
+++ b/meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch
@@ -0,0 +1,36 @@
1Upstream-Status: Inappropriate [configuration]
2
3libnl has progressed to 0.3.2 and there does not appear to be any
4"make -j" issues with this build after my limited testing on that
5newer version so we can assume this issue is fixed upstream
6
7Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
8
9Index: libnl-3.2.14/lib/Makefile.am
10===================================================================
11--- libnl-3.2.14.orig/lib/Makefile.am
12+++ libnl-3.2.14/lib/Makefile.am
13@@ -39,9 +39,12 @@ CLEANFILES = \
14
15 # Hack to avoid using ylwrap. It does not function correctly in combination
16 # with --header-file=
17+route/pktloc.lo: route/pktloc_syntax.h route/pktloc_grammar.h
18+route/pktloc_grammar.h: route/pktloc_grammar.c
19 route/pktloc_grammar.c: route/pktloc_grammar.l
20 $(AM_V_GEN) $(FLEX) --header-file=route/pktloc_grammar.h $(LFLAGS) -o $@ $^
21
22+route/pktloc_syntax.h: route/pktloc_syntax.c
23 route/pktloc_syntax.c: route/pktloc_syntax.y
24 $(AM_V_GEN) $(YACC) -d $(YFLAGS) -o $@ $^
25
26@@ -89,7 +92,9 @@ BUILT_SOURCES = \
27 route/cls/ematch_grammar.c \
28 route/cls/ematch_syntax.c \
29 route/pktloc_grammar.c \
30- route/pktloc_syntax.c
31+ route/pktloc_syntax.c \
32+ route/pktloc_syntax.h \
33+ route/pktloc_grammar.h
34
35 EXTRA_DIST = \
36 route/pktloc_grammar.l \
diff --git a/meta/recipes-support/libnl/libnl_3.2.22.bb b/meta/recipes-support/libnl/libnl_3.2.22.bb
new file mode 100644
index 0000000000..a299bfbe7b
--- /dev/null
+++ b/meta/recipes-support/libnl/libnl_3.2.22.bb
@@ -0,0 +1,44 @@
1SUMMARY = "A library for applications dealing with netlink sockets"
2HOMEPAGE = "http://www.infradead.org/~tgr/libnl/"
3SECTION = "libs/network"
4
5PE = "1"
6
7LICENSE = "LGPLv2.1"
8LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
9
10DEPENDS = "flex-native bison-native"
11
12SRC_URI = "http://www.infradead.org/~tgr/${BPN}/files/${BP}.tar.gz \
13 file://fix-pktloc_syntax_h-race.patch \
14 file://fix-pc-file.patch \
15 file://fix-lib-cache_mngr.c-two-parentheses-bugs.patch \
16 file://0001-fix-double-free-caused-by-freeing-link-af_data-in-rt.patch \
17 "
18
19SRC_URI[md5sum] = "2e1c889494d274aca24ce5f6a748e66e"
20SRC_URI[sha256sum] = "c7c5f267dfeae0c1a530bf96b71fb7c8dbbb07d54beef49b6712d8d6166f629b"
21
22inherit autotools-brokensep pkgconfig
23
24FILES_${PN} = "${libdir}/libnl-3.so.* \
25 ${libdir}/libnl.so.* \
26 ${sysconfdir}"
27RREPLACES_${PN} = "libnl2"
28RCONFLICTS_${PN} = "libnl2"
29FILES_${PN}-dbg += "${libdir}/libnl/cli/*/.debug"
30FILES_${PN}-dev += "${libdir}/libnl/cli/*/*.so \
31 ${libdir}/libnl/cli/*/*.la"
32FILES_${PN}-staticdev += "${libdir}/libnl/cli/*/*.a"
33
34PACKAGES += "${PN}-cli ${PN}-route ${PN}-nf ${PN}-genl"
35FILES_${PN}-cli = "${libdir}/libnl-cli-3.so.* \
36 ${libdir}/libnl/cli/*/*.so.* \
37 ${sbindir}/nl-*"
38FILES_${PN}-route = "${libdir}/libnl-route-3.so.*"
39FILES_${PN}-nf = "${libdir}/libnl-nf-3.so.*"
40FILES_${PN}-genl = "${libdir}/libnl-genl-3.so.* \
41 ${libdir}/libnl-genl.so.* \
42 ${sbindir}/genl-ctrl-list"
43RREPLACES_${PN}-genl = "libnl-genl2 libnl-genl-3-200"
44RCONFLICTS_${PN}-genl = "libnl-genl2 libnl-genl-3-200"