diff options
| -rw-r--r-- | meta-networking/recipes-support/tcpdump/tcpdump/0001-PPP-When-un-escaping-don-t-allocate-a-too-large-buff.patch | 70 | ||||
| -rw-r--r-- | meta-networking/recipes-support/tcpdump/tcpdump/0001-aclocal.m4-Skip-checking-for-pcap-config.patch | 33 | ||||
| -rw-r--r-- | meta-networking/recipes-support/tcpdump/tcpdump/add-ptest.patch | 28 | ||||
| -rw-r--r-- | meta-networking/recipes-support/tcpdump/tcpdump/avoid-absolute-path-when-searching-for-libdlpi.patch | 31 | ||||
| -rw-r--r-- | meta-networking/recipes-support/tcpdump/tcpdump/unnecessary-to-check-libpcap.patch | 40 | ||||
| -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 9b74e00c5b..0000000000 --- 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 @@ | |||
| 1 | From 32027e199368dad9508965aae8cd8de5b6ab5231 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Guy Harris <guy@alum.mit.edu> | ||
| 3 | Date: Sat, 18 Apr 2020 14:04:59 -0700 | ||
| 4 | Subject: [PATCH] PPP: When un-escaping, don't allocate a too-large buffer. | ||
| 5 | |||
| 6 | The buffer should be big enough to hold the captured data, but it | ||
| 7 | doesn't need to be big enough to hold the entire on-the-network packet, | ||
| 8 | if we haven't captured all of it. | ||
| 9 | |||
| 10 | (backported from commit e4add0b010ed6f2180dcb05a13026242ed935334) | ||
| 11 | |||
| 12 | Upstream-Status: Backport | ||
| 13 | Signed-off-by: Stacy Gaikovaia <stacy.gaikovaia@windriver.com> | ||
| 14 | |||
| 15 | --- | ||
| 16 | print-ppp.c | 18 ++++++++++++++---- | ||
| 17 | 1 file changed, 14 insertions(+), 4 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/print-ppp.c b/print-ppp.c | ||
| 20 | index 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 | -- | ||
| 69 | 2.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 0000000000..bb56c4d4c9 --- /dev/null +++ b/meta-networking/recipes-support/tcpdump/tcpdump/0001-aclocal.m4-Skip-checking-for-pcap-config.patch | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | From 867bf5c9d0fb64e1b4e64cb13b983674c270a6bf Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Yi Fan Yu <yifan.yu@windriver.com> | ||
| 3 | Date: Fri, 19 Feb 2021 00:52:35 -0500 | ||
| 4 | Subject: [PATCH] aclocal.m4: Skip checking for pcap-config | ||
| 5 | |||
| 6 | Bitbake triggers an configure error | ||
| 7 | saying we should look for pkg-config instead. | ||
| 8 | |||
| 9 | Upstream-Status: Inappropriate [OE-Specific] | ||
| 10 | |||
| 11 | Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> | ||
| 12 | --- | ||
| 13 | aclocal.m4 | 4 ++-- | ||
| 14 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/aclocal.m4 b/aclocal.m4 | ||
| 17 | index 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 | -- | ||
| 32 | 2.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 f8ff354fe1..c46de4b963 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 @@ | |||
| 1 | From 8c9c728757f89ebe6c4019114b83a63c63596f69 Mon Sep 17 00:00:00 2001 | 1 | From 5f0f70192b0e20336e642b02ca9662ba2fef66cf Mon Sep 17 00:00:00 2001 |
| 2 | From: "Hongjun.Yang" <hongjun.yang@windriver.com> | 2 | From: Yi Fan Yu <yifan.yu@windriver.com> |
| 3 | Date: Wed, 2 Oct 2019 16:57:06 -0400 | 3 | Date: Fri, 19 Feb 2021 15:21:18 -0500 |
| 4 | Subject: [PATCH] Add ptest for tcpdump | 4 | Subject: [PATCH] Add ptest for tcpdump |
| 5 | 5 | ||
| 6 | Upstream-Status: Pending | 6 | Upstream-Status: Pending |
| @@ -8,15 +8,21 @@ Upstream-Status: Pending | |||
| 8 | Signed-off-by: Hongjun.Yang <hongjun.yang@windriver.com> | 8 | Signed-off-by: Hongjun.Yang <hongjun.yang@windriver.com> |
| 9 | Signed-off-by: Peiran Hong <peiran.hong@windriver.com> | 9 | Signed-off-by: Peiran Hong <peiran.hong@windriver.com> |
| 10 | 10 | ||
| 11 | remove perl script not required by ptest causing QA problems | ||
| 12 | |||
| 13 | reference upstream issue/commit: | ||
| 14 | https://github.com/the-tcpdump-group/tcpdump/issues/26 | ||
| 15 | |||
| 16 | Signed-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 | ||
| 15 | diff --git a/Makefile.in b/Makefile.in | 21 | diff --git a/Makefile.in b/Makefile.in |
| 16 | index 3b589184..7b10e38c 100644 | 22 | index 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 | -- | ||
| 46 | 2.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 977ab95b78..0000000000 --- a/meta-networking/recipes-support/tcpdump/tcpdump/avoid-absolute-path-when-searching-for-libdlpi.patch +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 1 | From 02085028cdaf075943c27ebc02bb6de0289ec1d3 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Andre McCurdy <armccurdy@gmail.com> | ||
| 3 | Date: Wed, 2 Oct 2019 16:43:48 -0400 | ||
| 4 | Subject: [PATCH] avoid absolute path when searching for libdlpi | ||
| 5 | |||
| 6 | Let the build environment control library search paths. | ||
| 7 | |||
| 8 | Upstream-Status: Inappropriate [OE specific] | ||
| 9 | |||
| 10 | Signed-off-by: Andre McCurdy <armccurdy@gmail.com> | ||
| 11 | Signed-off-by: Peiran Hong <peiran.hong@windriver.com> | ||
| 12 | --- | ||
| 13 | configure.ac | 2 +- | ||
| 14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 15 | |||
| 16 | diff --git a/configure.ac b/configure.ac | ||
| 17 | index 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 | -- | ||
| 30 | 2.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 8793bf7a37..0000000000 --- a/meta-networking/recipes-support/tcpdump/tcpdump/unnecessary-to-check-libpcap.patch +++ /dev/null | |||
| @@ -1,40 +0,0 @@ | |||
| 1 | From dd023c133980fcc0cff5896e85377675e0571894 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Roy Li <rongqing.li@windriver.com> | ||
| 3 | Date: Tue, 8 Jul 2014 13:20:47 +0800 | ||
| 4 | Subject: [PATCH] unnecessary to check libpcap | ||
| 5 | |||
| 6 | since the check of libpcap did not consider the cross-compile, lead to the | ||
| 7 | below error: | ||
| 8 | This autoconf log indicates errors, it looked at host include and/or | ||
| 9 | library paths while determining system capabilities. | ||
| 10 | |||
| 11 | In fact, the libpcap has been added into the tcpdump's DEPENDS, not need to | ||
| 12 | check if libpcap existed. | ||
| 13 | |||
| 14 | Upstream-Status: Inappropriate [OE specific] | ||
| 15 | |||
| 16 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
| 17 | Signed-off-by: Andre McCurdy <armccurdy@gmail.com> | ||
| 18 | Signed-off-by: Peiran Hong <peiran.hong@windriver.com> | ||
| 19 | --- | ||
| 20 | configure.ac | 4 +++- | ||
| 21 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
| 22 | |||
| 23 | diff --git a/configure.ac b/configure.ac | ||
| 24 | index 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 | -- | ||
| 39 | 2.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 afcb4d508e..66510b7fde 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" | |||
| 2 | HOMEPAGE = "http://www.tcpdump.org/" | 2 | HOMEPAGE = "http://www.tcpdump.org/" |
| 3 | SECTION = "net" | 3 | SECTION = "net" |
| 4 | LICENSE = "BSD-3-Clause" | 4 | LICENSE = "BSD-3-Clause" |
| 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=1d4b0366557951c84a94fabe3529f867" | 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=5eb289217c160e2920d2e35bddc36453" |
| 6 | 6 | ||
| 7 | DEPENDS = "libpcap" | 7 | DEPENDS = "libpcap" |
| 8 | 8 | ||
| 9 | RDEPENDS_${PN}-ptest += " make perl \ | 9 | RDEPENDS_${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 | ||
| 14 | SRC_URI = " \ | 23 | SRC_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 | ||
| 23 | SRC_URI[md5sum] = "a4ead41d371f91aa0a2287f589958bae" | 30 | SRC_URI[md5sum] = "b10aa2f497def7283bc060f626879ce5" |
| 24 | SRC_URI[sha256sum] = "2cd47cb3d460b6ff75f4a9940f594317ad456cfbf2bd2c8e5151e16559db6410" | 31 | SRC_URI[sha256sum] = "8cf2f17a9528774a7b41060323be8b73f76024f7778f59c34efa65d49d80b842" |
| 25 | 32 | ||
| 26 | UPSTREAM_CHECK_REGEX = "tcpdump-(?P<pver>\d+(\.(?!99)\d+)+)\.tar" | 33 | UPSTREAM_CHECK_REGEX = "tcpdump-(?P<pver>\d+(\.(?!99)\d+)+)\.tar" |
| 27 | 34 | ||
| @@ -46,7 +53,7 @@ do_configure_prepend() { | |||
| 46 | 53 | ||
| 47 | do_install_append() { | 54 | do_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 | ||
| 52 | do_compile_ptest() { | 59 | do_compile_ptest() { |
