diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 14:36:22 +0200 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 15:32:53 +0200 |
commit | f4cf9fe05bb3f32fabea4e54dd92d368967a80da (patch) | |
tree | 487180fa9866985ea7b28e625651765d86f515c3 /meta/recipes-support/libnl | |
download | poky-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')
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 @@ | |||
1 | From 6f37b439af7e96104aadd8ec3ae8d3882df8d102 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jiri Pirko <jiri@resnulli.us> | ||
3 | Date: Wed, 21 Aug 2013 14:40:34 +0200 | ||
4 | Subject: [PATCH] fix double free caused by freeing link af_data in | ||
5 | rtnl_link_set_family() | ||
6 | |||
7 | Introduced by commit 8026fe2e3a9089eff3f5a06ee6e3cc78d96334ed ("link: | ||
8 | Free and realloc af specific data upon rtnl_link_set_family()") | ||
9 | |||
10 | link->l_af_data[link->l_af_ops->ao_family] is freed here but not set to | ||
11 | zero. That leads to double free made by link_free_data->do_foreach_af. | ||
12 | |||
13 | Fix this by setting link->l_af_data[link->l_af_ops->ao_family] to zero | ||
14 | rigth after free. | ||
15 | |||
16 | Signed-off-by: Jiri Pirko <jiri@resnulli.us> | ||
17 | Signed-off-by: Thomas Graf <tgraf@suug.ch> | ||
18 | --- | ||
19 | lib/route/link.c | 4 +++- | ||
20 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/lib/route/link.c b/lib/route/link.c | ||
23 | index 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 | -- | ||
40 | 1.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 @@ | |||
1 | From 82fdf49c185fd5f3810781af9ef52aa6a52bf2df Mon Sep 17 00:00:00 2001 | ||
2 | From: "Song.Li" <Song.Li@windriver.com> | ||
3 | Date: Thu, 28 Jun 2012 20:03:17 +0800 | ||
4 | Subject: [PATCH] fix lib/cache_mngr.c two parentheses bugs | ||
5 | |||
6 | there are two parentheses bugs in libnl /lib/cache_mngr.c file. | ||
7 | The parentheses doesn't make any sense, | ||
8 | This will cause the variable err get a bool value, | ||
9 | the correct value of variable err should be the return value | ||
10 | of 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 | |||
16 | Upstream-Status: Pending | ||
17 | |||
18 | diff --git a/lib/cache_mngr.c b/lib/cache_mngr.c | ||
19 | index 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 | -- | ||
36 | 1.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 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Some packages are asking only for libnl-2.0, but expects to get also | ||
4 | libnl-genl, libnl-nf libnl-route, easiest way to fix them is here. | ||
5 | |||
6 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
7 | Index: 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 @@ | |||
1 | Upstream-Status: Inappropriate [configuration] | ||
2 | |||
3 | libnl 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 | ||
5 | newer version so we can assume this issue is fixed upstream | ||
6 | |||
7 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
8 | |||
9 | Index: 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 @@ | |||
1 | SUMMARY = "A library for applications dealing with netlink sockets" | ||
2 | HOMEPAGE = "http://www.infradead.org/~tgr/libnl/" | ||
3 | SECTION = "libs/network" | ||
4 | |||
5 | PE = "1" | ||
6 | |||
7 | LICENSE = "LGPLv2.1" | ||
8 | LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" | ||
9 | |||
10 | DEPENDS = "flex-native bison-native" | ||
11 | |||
12 | SRC_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 | |||
19 | SRC_URI[md5sum] = "2e1c889494d274aca24ce5f6a748e66e" | ||
20 | SRC_URI[sha256sum] = "c7c5f267dfeae0c1a530bf96b71fb7c8dbbb07d54beef49b6712d8d6166f629b" | ||
21 | |||
22 | inherit autotools-brokensep pkgconfig | ||
23 | |||
24 | FILES_${PN} = "${libdir}/libnl-3.so.* \ | ||
25 | ${libdir}/libnl.so.* \ | ||
26 | ${sysconfdir}" | ||
27 | RREPLACES_${PN} = "libnl2" | ||
28 | RCONFLICTS_${PN} = "libnl2" | ||
29 | FILES_${PN}-dbg += "${libdir}/libnl/cli/*/.debug" | ||
30 | FILES_${PN}-dev += "${libdir}/libnl/cli/*/*.so \ | ||
31 | ${libdir}/libnl/cli/*/*.la" | ||
32 | FILES_${PN}-staticdev += "${libdir}/libnl/cli/*/*.a" | ||
33 | |||
34 | PACKAGES += "${PN}-cli ${PN}-route ${PN}-nf ${PN}-genl" | ||
35 | FILES_${PN}-cli = "${libdir}/libnl-cli-3.so.* \ | ||
36 | ${libdir}/libnl/cli/*/*.so.* \ | ||
37 | ${sbindir}/nl-*" | ||
38 | FILES_${PN}-route = "${libdir}/libnl-route-3.so.*" | ||
39 | FILES_${PN}-nf = "${libdir}/libnl-nf-3.so.*" | ||
40 | FILES_${PN}-genl = "${libdir}/libnl-genl-3.so.* \ | ||
41 | ${libdir}/libnl-genl.so.* \ | ||
42 | ${sbindir}/genl-ctrl-list" | ||
43 | RREPLACES_${PN}-genl = "libnl-genl2 libnl-genl-3-200" | ||
44 | RCONFLICTS_${PN}-genl = "libnl-genl2 libnl-genl-3-200" | ||