summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYi Fan Yu <yifan.yu@windriver.com>2021-02-19 22:17:25 -0500
committerKhem Raj <raj.khem@gmail.com>2021-02-21 23:37:54 -0800
commit138e4f59c36ecb0285e949dfd782b21e7a5fe6c2 (patch)
tree89704832ce9d4519648cb616c552e806f11cd830
parent1536d2b431a3eda3120b2cf72dc0527a54885933 (diff)
downloadmeta-openembedded-138e4f59c36ecb0285e949dfd782b21e7a5fe6c2.tar.gz
tcpdump: update 4.9.3 -> 4.99.0
Removed patches: * avoid-absolute-path-when-searching-for-libdlpi.patch reason: this is a solaris specific patch, It no longer generates QA error. * unnecessary-to-check-libpcap.patch reason: upstream changed the logic, a new patch was needed. New patch: * 0001-aclocal.m4-Skip-checking-for-pcap-config.patch reason: configure shouldn't look for pcap-config. upstream reference: cfc4c750a Modified patch: * add-ptest.patch reason: Makefile had slight change. new unrelated perl script was introduced, removed to make package QA happy. License: upstream removed some whitespace Ptest: binaries are now present in /usr/bin not /usr/sbin upstream commit: 95096be4f add perl libraries dependencies tests passed: 571 (qemux86-64) tests failed: 0 Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-networking/recipes-support/tcpdump/tcpdump/0001-PPP-When-un-escaping-don-t-allocate-a-too-large-buff.patch70
-rw-r--r--meta-networking/recipes-support/tcpdump/tcpdump/0001-aclocal.m4-Skip-checking-for-pcap-config.patch33
-rw-r--r--meta-networking/recipes-support/tcpdump/tcpdump/add-ptest.patch28
-rw-r--r--meta-networking/recipes-support/tcpdump/tcpdump/avoid-absolute-path-when-searching-for-libdlpi.patch31
-rw-r--r--meta-networking/recipes-support/tcpdump/tcpdump/unnecessary-to-check-libpcap.patch40
-rw-r--r--meta-networking/recipes-support/tcpdump/tcpdump_4.99.0.bb (renamed from meta-networking/recipes-support/tcpdump/tcpdump_4.9.3.bb)23
6 files changed, 67 insertions, 158 deletions
diff --git a/meta-networking/recipes-support/tcpdump/tcpdump/0001-PPP-When-un-escaping-don-t-allocate-a-too-large-buff.patch b/meta-networking/recipes-support/tcpdump/tcpdump/0001-PPP-When-un-escaping-don-t-allocate-a-too-large-buff.patch
deleted file mode 100644
index 9b74e00c5..000000000
--- a/meta-networking/recipes-support/tcpdump/tcpdump/0001-PPP-When-un-escaping-don-t-allocate-a-too-large-buff.patch
+++ /dev/null
@@ -1,70 +0,0 @@
1From 32027e199368dad9508965aae8cd8de5b6ab5231 Mon Sep 17 00:00:00 2001
2From: Guy Harris <guy@alum.mit.edu>
3Date: Sat, 18 Apr 2020 14:04:59 -0700
4Subject: [PATCH] PPP: When un-escaping, don't allocate a too-large buffer.
5
6The buffer should be big enough to hold the captured data, but it
7doesn't need to be big enough to hold the entire on-the-network packet,
8if we haven't captured all of it.
9
10(backported from commit e4add0b010ed6f2180dcb05a13026242ed935334)
11
12Upstream-Status: Backport
13Signed-off-by: Stacy Gaikovaia <stacy.gaikovaia@windriver.com>
14
15---
16 print-ppp.c | 18 ++++++++++++++----
17 1 file changed, 14 insertions(+), 4 deletions(-)
18
19diff --git a/print-ppp.c b/print-ppp.c
20index 89176172..33fb0341 100644
21--- a/print-ppp.c
22+++ b/print-ppp.c
23@@ -1367,19 +1367,29 @@ trunc:
24 return 0;
25 }
26
27+/*
28+ * Un-escape RFC 1662 PPP in HDLC-like framing, with octet escapes.
29+ * The length argument is the on-the-wire length, not the captured
30+ * length; we can only un-escape the captured part.
31+ */
32 static void
33 ppp_hdlc(netdissect_options *ndo,
34 const u_char *p, int length)
35 {
36+ u_int caplen = ndo->ndo_snapend - p;
37 u_char *b, *t, c;
38 const u_char *s;
39- int i, proto;
40+ u_int i;
41+ int proto;
42 const void *se;
43
44+ if (caplen == 0)
45+ return;
46+
47 if (length <= 0)
48 return;
49
50- b = (u_char *)malloc(length);
51+ b = (u_char *)malloc(caplen);
52 if (b == NULL)
53 return;
54
55@@ -1388,10 +1398,10 @@ ppp_hdlc(netdissect_options *ndo,
56 * Do this so that we dont overwrite the original packet
57 * contents.
58 */
59- for (s = p, t = b, i = length; i > 0 && ND_TTEST(*s); i--) {
60+ for (s = p, t = b, i = caplen; i != 0; i--) {
61 c = *s++;
62 if (c == 0x7d) {
63- if (i <= 1 || !ND_TTEST(*s))
64+ if (i <= 1)
65 break;
66 i--;
67 c = *s++ ^ 0x20;
68--
692.17.1
70
diff --git a/meta-networking/recipes-support/tcpdump/tcpdump/0001-aclocal.m4-Skip-checking-for-pcap-config.patch b/meta-networking/recipes-support/tcpdump/tcpdump/0001-aclocal.m4-Skip-checking-for-pcap-config.patch
new file mode 100644
index 000000000..bb56c4d4c
--- /dev/null
+++ b/meta-networking/recipes-support/tcpdump/tcpdump/0001-aclocal.m4-Skip-checking-for-pcap-config.patch
@@ -0,0 +1,33 @@
1From 867bf5c9d0fb64e1b4e64cb13b983674c270a6bf Mon Sep 17 00:00:00 2001
2From: Yi Fan Yu <yifan.yu@windriver.com>
3Date: Fri, 19 Feb 2021 00:52:35 -0500
4Subject: [PATCH] aclocal.m4: Skip checking for pcap-config
5
6Bitbake triggers an configure error
7saying we should look for pkg-config instead.
8
9Upstream-Status: Inappropriate [OE-Specific]
10
11Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com>
12---
13 aclocal.m4 | 4 ++--
14 1 file changed, 2 insertions(+), 2 deletions(-)
15
16diff --git a/aclocal.m4 b/aclocal.m4
17index bd4e27a5..136cb8ca 100644
18--- a/aclocal.m4
19+++ b/aclocal.m4
20@@ -584,8 +584,8 @@ AC_DEFUN(AC_LBL_LIBPCAP,
21 # No pkg-config
22 # Look for an installed pcap-config.
23 #
24- AC_PATH_TOOL(PCAP_CONFIG, pcap-config)
25- if test -n "$PCAP_CONFIG" ; then
26+ # AC_PATH_TOOL(PCAP_CONFIG, pcap-config)
27+ if false; then
28 #
29 # Found - use it to get the include flags for
30 # libpcap and the flags to link with libpcap.
31--
322.29.2
33
diff --git a/meta-networking/recipes-support/tcpdump/tcpdump/add-ptest.patch b/meta-networking/recipes-support/tcpdump/tcpdump/add-ptest.patch
index f8ff354fe..c46de4b96 100644
--- a/meta-networking/recipes-support/tcpdump/tcpdump/add-ptest.patch
+++ b/meta-networking/recipes-support/tcpdump/tcpdump/add-ptest.patch
@@ -1,6 +1,6 @@
1From 8c9c728757f89ebe6c4019114b83a63c63596f69 Mon Sep 17 00:00:00 2001 1From 5f0f70192b0e20336e642b02ca9662ba2fef66cf Mon Sep 17 00:00:00 2001
2From: "Hongjun.Yang" <hongjun.yang@windriver.com> 2From: Yi Fan Yu <yifan.yu@windriver.com>
3Date: Wed, 2 Oct 2019 16:57:06 -0400 3Date: Fri, 19 Feb 2021 15:21:18 -0500
4Subject: [PATCH] Add ptest for tcpdump 4Subject: [PATCH] Add ptest for tcpdump
5 5
6Upstream-Status: Pending 6Upstream-Status: Pending
@@ -8,15 +8,21 @@ Upstream-Status: Pending
8Signed-off-by: Hongjun.Yang <hongjun.yang@windriver.com> 8Signed-off-by: Hongjun.Yang <hongjun.yang@windriver.com>
9Signed-off-by: Peiran Hong <peiran.hong@windriver.com> 9Signed-off-by: Peiran Hong <peiran.hong@windriver.com>
10 10
11remove perl script not required by ptest causing QA problems
12
13reference upstream issue/commit:
14https://github.com/the-tcpdump-group/tcpdump/issues/26
15
16Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com>
11--- 17---
12 Makefile.in | 10 +++++++++- 18 Makefile.in | 11 ++++++++++-
13 1 file changed, 9 insertions(+), 1 deletion(-) 19 1 file changed, 10 insertions(+), 1 deletion(-)
14 20
15diff --git a/Makefile.in b/Makefile.in 21diff --git a/Makefile.in b/Makefile.in
16index 3b589184..7b10e38c 100644 22index ea1ef1d0..e7987bd8 100644
17--- a/Makefile.in 23--- a/Makefile.in
18+++ b/Makefile.in 24+++ b/Makefile.in
19@@ -437,9 +437,17 @@ distclean: 25@@ -445,9 +445,18 @@ distclean:
20 tests/failure-outputs.txt 26 tests/failure-outputs.txt
21 rm -rf autom4te.cache tests/DIFF tests/NEW 27 rm -rf autom4te.cache tests/DIFF tests/NEW
22 28
@@ -24,14 +30,18 @@ index 3b589184..7b10e38c 100644
24+buildtest-TESTS: tcpdump 30+buildtest-TESTS: tcpdump
25+ 31+
26+runtest-PTEST: 32+runtest-PTEST:
27 (mkdir -p tests && SRCDIR=`cd ${srcdir}; pwd` && export SRCDIR && $$SRCDIR/tests/TESTrun.sh ) 33 $(srcdir)/tests/TESTrun
28 34
29+install-ptest: 35+install-ptest:
30+ cp -r tests $(DESTDIR) 36+ cp -r tests $(DESTDIR)
37+ rm $(DESTDIR)/tests/setkey2esp-secrets.pl
31+ cp -r config.h $(DESTDIR) 38+ cp -r config.h $(DESTDIR)
32+ install -m 0755 Makefile $(DESTDIR) 39+ install -m 0755 Makefile $(DESTDIR)
33+ ln -sf /usr/sbin/tcpdump $(DESTDIR)/tcpdump 40+ ln -s /usr/bin/tcpdump $(DESTDIR)/tcpdump
34+ 41+
35 extags: $(TAGFILES) 42 extags: $(TAGFILES)
36 ctags $(TAGFILES) 43 ctags $(TAGFILES)
37 44
45--
462.29.2
47
diff --git a/meta-networking/recipes-support/tcpdump/tcpdump/avoid-absolute-path-when-searching-for-libdlpi.patch b/meta-networking/recipes-support/tcpdump/tcpdump/avoid-absolute-path-when-searching-for-libdlpi.patch
deleted file mode 100644
index 977ab95b7..000000000
--- a/meta-networking/recipes-support/tcpdump/tcpdump/avoid-absolute-path-when-searching-for-libdlpi.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1From 02085028cdaf075943c27ebc02bb6de0289ec1d3 Mon Sep 17 00:00:00 2001
2From: Andre McCurdy <armccurdy@gmail.com>
3Date: Wed, 2 Oct 2019 16:43:48 -0400
4Subject: [PATCH] avoid absolute path when searching for libdlpi
5
6Let the build environment control library search paths.
7
8Upstream-Status: Inappropriate [OE specific]
9
10Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
11Signed-off-by: Peiran Hong <peiran.hong@windriver.com>
12---
13 configure.ac | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/configure.ac b/configure.ac
17index 3401a7a3..6a52485a 100644
18--- a/configure.ac
19+++ b/configure.ac
20@@ -528,7 +528,7 @@ don't.])
21 fi
22
23 # libdlpi is needed for Solaris 11 and later.
24-AC_CHECK_LIB(dlpi, dlpi_walk, LIBS="$LIBS -ldlpi" LDFLAGS="-L/lib $LDFLAGS", ,-L/lib)
25+AC_CHECK_LIB(dlpi, dlpi_walk, LIBS="$LIBS -ldlpi")
26
27 dnl
28 dnl Check for "pcap_list_datalinks()", "pcap_set_datalink()",
29--
302.17.1
31
diff --git a/meta-networking/recipes-support/tcpdump/tcpdump/unnecessary-to-check-libpcap.patch b/meta-networking/recipes-support/tcpdump/tcpdump/unnecessary-to-check-libpcap.patch
deleted file mode 100644
index 8793bf7a3..000000000
--- a/meta-networking/recipes-support/tcpdump/tcpdump/unnecessary-to-check-libpcap.patch
+++ /dev/null
@@ -1,40 +0,0 @@
1From dd023c133980fcc0cff5896e85377675e0571894 Mon Sep 17 00:00:00 2001
2From: Roy Li <rongqing.li@windriver.com>
3Date: Tue, 8 Jul 2014 13:20:47 +0800
4Subject: [PATCH] unnecessary to check libpcap
5
6since the check of libpcap did not consider the cross-compile, lead to the
7below error:
8 This autoconf log indicates errors, it looked at host include and/or
9 library paths while determining system capabilities.
10
11In fact, the libpcap has been added into the tcpdump's DEPENDS, not need to
12check if libpcap existed.
13
14Upstream-Status: Inappropriate [OE specific]
15
16Signed-off-by: Roy Li <rongqing.li@windriver.com>
17Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
18Signed-off-by: Peiran Hong <peiran.hong@windriver.com>
19---
20 configure.ac | 4 +++-
21 1 file changed, 3 insertions(+), 1 deletion(-)
22
23diff --git a/configure.ac b/configure.ac
24index 56e2a624..3401a7a3 100644
25--- a/configure.ac
26+++ b/configure.ac
27@@ -404,7 +404,9 @@ dnl Some platforms may need -lnsl for getrpcbynumber.
28 AC_SEARCH_LIBS(getrpcbynumber, nsl,
29 AC_DEFINE(HAVE_GETRPCBYNUMBER, 1, [define if you have getrpcbynumber()]))
30
31-AC_LBL_LIBPCAP(V_PCAPDEP, V_INCLS)
32+# Simplified (more cross compile friendly) check for libpcap. All we really
33+# need is to sanity check that libpcap is available and add -lpcap to LIBS.
34+AC_CHECK_LIB(pcap, pcap_compile, LIBS="$LIBS -lpcap")
35
36 #
37 # Check for these after AC_LBL_LIBPCAP, so we link with the appropriate
38--
392.17.1
40
diff --git a/meta-networking/recipes-support/tcpdump/tcpdump_4.9.3.bb b/meta-networking/recipes-support/tcpdump/tcpdump_4.99.0.bb
index afcb4d508..66510b7fd 100644
--- a/meta-networking/recipes-support/tcpdump/tcpdump_4.9.3.bb
+++ b/meta-networking/recipes-support/tcpdump/tcpdump_4.99.0.bb
@@ -2,26 +2,33 @@ SUMMARY = "A sophisticated network protocol analyzer"
2HOMEPAGE = "http://www.tcpdump.org/" 2HOMEPAGE = "http://www.tcpdump.org/"
3SECTION = "net" 3SECTION = "net"
4LICENSE = "BSD-3-Clause" 4LICENSE = "BSD-3-Clause"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=1d4b0366557951c84a94fabe3529f867" 5LIC_FILES_CHKSUM = "file://LICENSE;md5=5eb289217c160e2920d2e35bddc36453"
6 6
7DEPENDS = "libpcap" 7DEPENDS = "libpcap"
8 8
9RDEPENDS_${PN}-ptest += " make perl \ 9RDEPENDS_${PN}-ptest += " make perl \
10 perl-module-file-basename \ 10 perl-module-file-basename \
11 perl-module-file-spec \
12 perl-module-file-spec-unix \
13 perl-module-file-path \
14 perl-module-file-glob \
15 perl-module-data-dumper \
16 perl-module-bytes \
11 perl-module-posix \ 17 perl-module-posix \
12 perl-module-carp" 18 perl-module-carp \
19 perl-module-cwd \
20 perl-module-constant \
21"
13 22
14SRC_URI = " \ 23SRC_URI = " \
15 http://www.tcpdump.org/release/${BP}.tar.gz \ 24 http://www.tcpdump.org/release/${BP}.tar.gz \
16 file://unnecessary-to-check-libpcap.patch \
17 file://avoid-absolute-path-when-searching-for-libdlpi.patch \
18 file://add-ptest.patch \ 25 file://add-ptest.patch \
19 file://run-ptest \ 26 file://run-ptest \
20 file://0001-PPP-When-un-escaping-don-t-allocate-a-too-large-buff.patch \ 27 file://0001-aclocal.m4-Skip-checking-for-pcap-config.patch \
21" 28"
22 29
23SRC_URI[md5sum] = "a4ead41d371f91aa0a2287f589958bae" 30SRC_URI[md5sum] = "b10aa2f497def7283bc060f626879ce5"
24SRC_URI[sha256sum] = "2cd47cb3d460b6ff75f4a9940f594317ad456cfbf2bd2c8e5151e16559db6410" 31SRC_URI[sha256sum] = "8cf2f17a9528774a7b41060323be8b73f76024f7778f59c34efa65d49d80b842"
25 32
26UPSTREAM_CHECK_REGEX = "tcpdump-(?P<pver>\d+(\.(?!99)\d+)+)\.tar" 33UPSTREAM_CHECK_REGEX = "tcpdump-(?P<pver>\d+(\.(?!99)\d+)+)\.tar"
27 34
@@ -46,7 +53,7 @@ do_configure_prepend() {
46 53
47do_install_append() { 54do_install_append() {
48 # make install installs an unneeded extra copy of the tcpdump binary 55 # make install installs an unneeded extra copy of the tcpdump binary
49 rm -f ${D}${sbindir}/tcpdump.${PV} 56 rm ${D}${bindir}/tcpdump.${PV}
50} 57}
51 58
52do_compile_ptest() { 59do_compile_ptest() {