aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
5 daysCI: Remove a comment about a fixed warningupstream-tcpdump-4.99Francois-Xavier Le Bail
It is a follow-up to e8a0bec3b9a0c466abd74f3e05c4cf09a72e4c65. (backported from commit ad42bfe5362b034b2aefdba05330f3c53ece92cb)
5 daysfuncattrs: Update the NORETURN definition condition for TinyCCFrancois-Xavier Le Bail
Current TinyCC support __attribute((noreturn)). (cherry picked from commit 5adcf64ae82cd78c94c4296eec6834d26060cd24)
5 daysCI: Add TinyCC (aka TCC) supportFrancois-Xavier Le Bail
Identification examples: tcc-0.9.27, tcc-0.9.28rc There are currently warnings such as: print-802_11.c:3317: warning: assignment discards qualifiers from pointer target type print-ldp.c:702: warning: function might return no value: 'ldp_pdu_print' So use: TCPDUMP_TAINTED=yes Works on linux-amd64. Does not work on linux-armv7l with BUILD_LIBPCAP=yes / CMAKE=yes (Segmentation fault, libpcap dynamically linked). Works with 0.9.28rc. TinyCC can be found at https://bellard.org/tcc/, https://repo.or.cz/r/tinycc.git or as package on some distros. (backported from commit 57f1c409a4c90ead5c6126e7c745d6ad6c473607)
10 daysIPv6: Update a commentFrancois-Xavier Le Bail
"advance" is used since commit 66df248b49095c261138b5a5e34d341a6bf9ac7f. (cherry picked from commit 429c68e33bf729ebbba1bffabbf166608bfb55bd) [skip ci]
10 daysInclude <config.h> unconditionallyFrancois-Xavier Le Bail
Builds using Autotools or CMake generate config.h, thus remove the '#ifdef HAVE_CONFIG_H'/'#endif'. Remove also the 'add_definitions(-DHAVE_CONFIG_H)' in CMakeLists.txt. (backported from commit 94a3708f00f658994293a440fbbb7e71e2047a0f)
2024-05-08NFS: Add two length checksFrancois-Xavier Le Bail
This change avoids adding a large number to the packet pointer and overflow it. It also avoids the differences between 32-bit and 64-bit printouts. Example: 32-bit: NFS request xid 1168185174 80 readdirplus fh / 1441792 bytes @ 1585267068834414592 [|nfs] --- 64-bit: NFS request xid 1168185174 80 readdirplus [|nfs] Add a test file. Update a test output accordingly. (cherry picked from commit 47edb26bde6473ff8732ba77c6f6138925e0c2b5)
2024-05-07frag6: Fix invalid 32-bit versus 64-bit printoutsFrancois-Xavier Le Bail
Print "[length < 0] (invalid)" when fragment length is negative. In this case, e.g. when IPv6 payload length is zero, the 32-bit and 64-bit printouts were different. Example: 32-bit: frag (0x80000074:1280|4294967288) --- 64-bit: frag (0x80000074:1280|18446744073709551608) Add a test file. (cherry picked from commit 067f7dd17dc39144c4b292a13ceea53610b4b5e0)
2024-05-07frag6: Refactor duplicate codeFrancois-Xavier Le Bail
Update a test output accordingly. (cherry picked from commit 37745f6daa8d8a23d74d045e8141a04309453dd0)
2024-05-05Include <fcntl.h> unconditionallyFrancois-Xavier Le Bail
It is used for open() which is in POSIX.1-2001, POSIX.1-2008. libpcap has included <fcntl.h> unconditionally since at least 1999. (cherry picked from commit f81ffd175499bf3252594d90932c553ea668765b)
2024-05-05Remove an unneeded includeFrancois-Xavier Le Bail
Remove <fcntl.h> conditional include from util-print.c. Historically read_infile() was in util.c and used open(), so needed it. When part of util.c became util-print.c without read_infile(), the include was left without need. (cherry picked from commit 80dce061ddca0059dd76c2127daf218b7b97ef5f)
2024-05-03Autoconf: Update an AC_DEFINE()Francois-Xavier Le Bail
Same result in config.h as with CMake. Before: #define NETINET_ETHER_H_DECLARES_ETHER_NTOHOST /**/ After: #define NETINET_ETHER_H_DECLARES_ETHER_NTOHOST 1 (cherry picked from commit e5b1cab0483a5fbb958d453c07aab7307c73fc2b) [skip ci]
2024-05-02AppVeyor: try building with Visual Studio 2022.Guy Harris
(cherry picked from commit cf3566e677bd30beacbf997ca3afff1ff4831947) [skip ci]
2024-05-01Extend "make shellcheck" onto mkdep too. [skip appveyor]Denis Ovsienko
For shell trap purposes, "1 2 3 13 15" is the same as "HUP INT QUIT PIPE TERM" in AIX, FreeBSD, Hurd, illumos, Linux, macOS, NetBSD, OpenBSD and Solaris. However, in Haiku SIGPIPE is 7 and 13 is SIGTSTP. Address all warnings from shellcheck 0.9.0: mkdep:66:11: note: Double quote to prevent globbing and word splitting. [SC2086] mkdep:73:34: warning: Trapping signals by number is not well defined. Prefer signal names. [SC2172] mkdep:75:4: note: Double quote to prevent globbing and word splitting. [SC2086] mkdep:75:10: note: Double quote to prevent globbing and word splitting. [SC2086] mkdep:77:41: note: Double quote to prevent globbing and word splitting. [SC2086] mkdep:77:49: note: Double quote to prevent globbing and word splitting. [SC2086] mkdep:79:17: note: Double quote to prevent globbing and word splitting. [SC2086] mkdep:97:16: warning: Use "$@" (with quotes) to prevent whitespace problems. [SC2048] mkdep:103:5: note: Double quote to prevent globbing and word splitting. [SC2086] mkdep:103:23: note: Double quote to prevent globbing and word splitting. [SC2086] mkdep:103:30: note: Double quote to prevent globbing and word splitting. [SC2086] mkdep:106:11: note: Double quote to prevent globbing and word splitting. [SC2086] mkdep:108:17: note: Double quote to prevent globbing and word splitting. [SC2086] mkdep:114:4: note: Double quote to prevent globbing and word splitting. [SC2086] mkdep:114:9: note: Double quote to prevent globbing and word splitting. [SC2086] mkdep:115:7: note: Double quote to prevent globbing and word splitting. [SC2086] mkdep:115:19: note: Double quote to prevent globbing and word splitting. [SC2086] (cherry picked from commit 983d4321e9579c09ab6aaa3896b1a834be95fca6)
2024-04-29Add recent contributors to CREDITS. [skip ci]Denis Ovsienko
2024-04-26Makefile.in: Update the whitespacecheck targetFrancois-Xavier Le Bail
install-sh has no longer a tab at the end of one line. This is a follow-up to fb182281c44e0d18aac5716ae4464be292fb6e9d. (cherry picked from commit ec5cc2499c3bb86f0862e58354133954e8a213bf)
2024-04-24CMake: search for gethostbyaddr() in libnetworkDavid Karoly
(cherry picked from commit bdece165acc8dd20b445938da7ac3770bd28b8ee)
2024-04-24autoconf: search for gethostbyaddr() in libnetworkJerome Duval
This is needed for building on Haiku. (cherry picked from commit 13b7faac2c75c660559302be7a6e9fabcdfe95c8)
2024-04-24configure: check for gethostbyaddr(), not gethostbyname().Guy Harris
We use gethostbyaddr() to translate IP addresses in packets to names; we don't use gethostbyname() to translate names to IP addresses (libpcap does the latter when compiling filters, so we leave that up to it, and nothing's left for us to do). This probably has the same effect as checking for gethostbyname(), but it makes it a bit clearer why we'd check for it. (cherry picked from commit b1ccc20ccc9bdd73ed065db61ab9cb5b74e5acb4)
2024-04-17Rename the suffix of a pcap test file to .pcapFrancois-Xavier Le Bail
(cherry picked from commit bb704ed32d770e84fdc340de8276c261bb6e9ee1)
2024-04-13CHANGES: Update an entry to avoid any misunderstandingFrancois-Xavier Le Bail
(cherry picked from commit 4ffb715478ad6c51c3a736f05dfb4e4b6a41500b) [skip ci]
2024-04-10doc: rename README.Win32.md to README.windows.md.Guy Harris
That matches the name of the equivalent libpcap document, and doesn't tie it to 32 bits. (16-bit Windows is long since dead.) (backported from commit b820ca8237ad10fb5f975a2e73397b0abc427796) [skip ci]
2024-04-09mkdep: Use TMPDIR if it is set and not nullFrancois-Xavier Le Bail
(cherry picked from commit 1abe1f8c90ee8335fa1be261a0eed6ad1ac8473c) [skip ci]
2024-04-09CHANGES: Add two changes backported to the 4.99 branchFrancois-Xavier Le Bail
(cherry picked from commit 7652b93066c0051093aed47b2139773536d03296) [skip ci]
2024-04-09mkdep: Exit with a non-zero status if a command failsFrancois-Xavier Le Bail
This could help detect errors such as in the previous commit. (cherry picked from commit 420f9f215bf523a28b924161a0619957012cda6b)
2024-04-09Makefile.in: Fix the depend targetFrancois-Xavier Le Bail
Fix an error on Solaris 10 like: ./mkdep: /opt/solarisstudio12.3/bin/cc -D_STDC_C99=: not found When configure get some compiler option like: checking for /opt/solarisstudio12.3/bin/cc option to accept ISO C99... -D_STDC_C99= Makefile will contain: CC = /opt/solarisstudio12.3/bin/cc -D_STDC_C99= And if we use '-c "$(CC)"' mkdep will set and try to run: CC="/opt/solarisstudio12.3/bin/cc -D_STDC_C99=", which is incorrect. Remove the quotes to allow mkdep to set CC with the compiler name and set flags with the option. (cherry picked from commit db1e124f4955ad6e8d042106b2b14c7fd07be804)
2024-04-05VERSION: Fix suffixFrancois-Xavier Le Bail
Use "PRE-GIT" as usual, not "PRE_GIT".
2024-04-05CHANGES: Move a backported change to the 4.99 branchFrancois-Xavier Le Bail
Use Autoconf with 'A', as this is the official name of the package. (cherry picked from commit 6eccce9a7c328158027b404b9504cf2d1afaa01e) [skip ci]
2024-04-04CI: Expect warnings from Sun C on Solaris. [skip ci]Denis Ovsienko
The known warning do not stand for any known bug and have been addressed in the master branch already.
2024-04-04Fix Sun C invocation from CMake.Denis Ovsienko
cc: Can not use -xc99 with -pedantic (cherry picked from commit b29858253cb12894604b8cc479b23df3e484a889)
2024-04-04Cirrus CI: Synchronize with the master branch.Denis Ovsienko
2024-04-04CI: Synchronize scripts with the master branch.Denis Ovsienko
2024-04-04Fix propagation of cc_werr_cflags() output. [skip ci]Denis Ovsienko
Same as in libpcap. It is not the propagation that tcpdump needs from this change, but the proper application of compiler options. (cherry picked from commit f32255ba1324e14dcb3def10c9141adccb21cf60)
2024-04-03Update the install-sh script to the 2020-11-14.01 versionRose
I updated the script by running autoreconf -fiv on autoconf 2.71, and autoreconf automatically updated the script. scriptversion=2020-11-14.01 Origin and sha256 of this script -------------------------------- https://git.savannah.gnu.org/git/automake.git file: lib/install-sh sha256: 3d7488bebd0cfc9b5c440c55d5b44f1c6e2e3d3e19894821bae4a27f9307f1d2 install-sh commit 3313d9ca6f4928d2d2f6103aad7606666a46401d (HEAD) Author: Karl Berry <karl@freefriends.org> Date: Fri Nov 13 17:51:46 2020 -0800 install-sh: trailing whitespace. * lib/install-sh: remove trailing whitespace. Sigh. (scriptversion): 2020-11-14.01 It is also in the autoconf repository: (build-aux/install-sh, commit 50e9bcc67d76f0e7e9fbe1bd08b3c73ae68a4e9b). (backported from commit b5a4b9338ca5d063914b7bacbbdda5faf0b27ce4)
2024-04-03Update the error message when checking for pcap_loop()Francois-Xavier Le Bail
Add a first error case when trying to build a 32-bit tcpdump with a 64-bit libpcap or vice versa. (cherry picked from commit 42116158c3731c52c30cb27767b287c5fa4d4471) [skip ci]
2024-03-28CHANGES: mention a change backported to 1.10. [skip ci]Guy Harris
(cherry picked from commit f23d7f635525c277eadf038de2b23f1475f3e0c9)
2024-03-28doc: fix RADME.Win32.md issues. [skip ci]Guy Harris
This fixes #1158. (cherry picked from commit 2e689a60c3f00ee3a473451d46e857272c27db6e)
2024-03-27CHANGES: Fix an entryFrancois-Xavier Le Bail
(cherry picked from commit 54b1b32da2b2255a2be3ac11ca4425384645330c) [skip ci]
2024-03-27man: Update the dateFrancois-Xavier Le Bail
(backported from commit dca40504936de8cbd04dfee45146d3d82f8b4564) [skip ci]
2024-03-26man: Update the -# (--number) option entryFrancois-Xavier Le Bail
Remove "optional". If we choose to print a packet number, it is not optional. (cherry picked from commit 9d2e0f183434b99c1932af733c4123c0c5a9be0d) [skip ci]
2024-03-25Fix an error when using update-test.sh with a Geneve testFrancois-Xavier Le Bail
The error was: tcpdump: can't parse filter expression: syntax error (cherry picked from commit 22f40323ffb03f764d8182214b070277d2ba950d)
2024-03-22CHANGES: Add some changes backported to 4.99Francois-Xavier Le Bail
(cherry picked from commit 4ccb31bf4a07eff65ea7874964c4ee644a9ec59a) [skip ci]
2024-03-22smbutil.c: Use the "%Y-%m-%d" date formatFrancois-Xavier Le Bail
Replace "%Y/%m/%d" with "%Y-%m-%d" like in most date formats. %T is equivalent to %H:%M:%S. Moreover: Fix indentation. (cherry picked from commit a705f1c1eebc61d460509572f977efab56481190)
2024-03-22ZEP: Use the "%Y-%m-%d" date formatFrancois-Xavier Le Bail
Replace "%Y/%m/%d" with "%Y-%m-%d" like in most date formats. (backported from commit c3dc126cfa7250e096ae2edf329502c4ab5eda0a)
2024-03-22RX: Use the "%Y-%m-%d" date formatFrancois-Xavier Le Bail
Replace "%Y/%m/%d" with "%Y-%m-%d" like in most date formats. (cherry picked from commit 8e464bd4d80e8b929ea05bdfc19b6e929a1196fd)
2024-03-22Update the "Error converting time" tests for packet timesFrancois-Xavier Le Bail
Replace 0x80000000 mask test on tv_sec by a test on tv_sec negative in ts_date_hmsfrac_print() and ts_unix_print(). Replace the error message by "[timestamp < 1970-01-01 00:00:00 UTC]" (cherry picked from commit b84bd2b4b55067d1eea6181e1a09043ac093d48c)
2024-03-22Fix warnings when building for 32-bit and defining _TIME_BITS=64Francois-Xavier Le Bail
The warnings, given by clang with -Wshorten-64-to-32, were: ./util-print.c:306:48: warning: implicit conversion loses integer precision: 'const __suseconds64_t' (aka 'const long long') to 'long' [-Wshorten-64-to-32] ts_date_hmsfrac_print(ndo, tvp->tv_sec, tvp->tv_usec, ~~~~~~~~~~~~~~~~~~~~~ ~~~~~^~~~~~~ ./util-print.c:306:35: warning: implicit conversion loses integer precision: 'const __time64_t' (aka 'const long long') to 'long' [-Wshorten-64-to-32] ts_date_hmsfrac_print(ndo, tvp->tv_sec, tvp->tv_usec, ~~~~~~~~~~~~~~~~~~~~~ ~~~~~^~~~~~ ./util-print.c:315:40: warning: implicit conversion loses integer precision: 'const __suseconds64_t' (aka 'const long long') to 'long' [-Wshorten-64-to-32] ts_unix_print(ndo, tvp->tv_sec, tvp->tv_usec); ~~~~~~~~~~~~~ ~~~~~^~~~~~~ ./util-print.c:315:27: warning: implicit conversion loses integer precision: 'const __time64_t' (aka 'const long long') to 'long' [-Wshorten-64-to-32] ts_unix_print(ndo, tvp->tv_sec, tvp->tv_usec); ~~~~~~~~~~~~~ ~~~~~^~~~~~ ./util-print.c:346:58: warning: implicit conversion loses integer precision: '__suseconds64_t' (aka 'long long') to 'long' [-Wshorten-64-to-32] ts_date_hmsfrac_print(ndo, tv_result.tv_sec, tv_result.tv_usec, ~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~^~~~~~~ ./util-print.c:346:40: warning: implicit conversion loses integer precision: '__time64_t' (aka 'long long') to 'long' [-Wshorten-64-to-32] ts_date_hmsfrac_print(ndo, tv_result.tv_sec, tv_result.tv_usec, ~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~^~~~~~ ./util-print.c:355:48: warning: implicit conversion loses integer precision: 'const __suseconds64_t' (aka 'const long long') to 'long' [-Wshorten-64-to-32] ts_date_hmsfrac_print(ndo, tvp->tv_sec, tvp->tv_usec, ~~~~~~~~~~~~~~~~~~~~~ ~~~~~^~~~~~~ ./util-print.c:355:35: warning: implicit conversion loses integer precision: 'const __time64_t' (aka 'const long long') to 'long' [-Wshorten-64-to-32] ts_date_hmsfrac_print(ndo, tvp->tv_sec, tvp->tv_usec, ~~~~~~~~~~~~~~~~~~~~~ ~~~~~^~~~~~ (cherry picked from commit 975ea36571dc3a00dd4c5b83c756f3a53b681704)
2024-03-22Update some tests files if the packet time is > 2038-01-19 03:14:07 UTCFrancois-Xavier Le Bail
This will avoid, for now, "[Error converting time]" messages even when replacing 0x80000000 mask test on tv_sec by a test on tv_sec negative in ts_date_hmsfrac_print() and ts_unix_print(). With this change, the outputs remain the same when building on 64-bit or 32-bit with 32 or 64 time_t size. The updated time is: 2038-01-01 00:00:00.000000 (Un*x time 2145916800). (cherry picked from commit e6d9535cd6b652e77e1680aa60fe896e85a178f8)
2024-03-22Update the GitHub issue templateFrancois-Xavier Le Bail
Set more emphasis on security reports. (cherry picked from commit ba620a6cbdbcb48ca74fc39195e56d952b7b0f11) [skip ci]
2024-03-22Update --version option to print 32/64-bit build and time_t sizeFrancois-Xavier Le Bail
Use only sizeof() and not SIZEOF_VOID_P/SIZEOF_TIME_T because these macros could have invalid values in some macOS fat builds (See commit e9c0bfe6d209e3e95e3da7204d1b88670ac95c3d). This method should be future proof. With this change we know: whether this is a 32-bit or 64-bit build; whether the time_t size is 32-bit or 64-bit. (cherry picked from commit 218a378a6fb336b226ed0100efc37f4214c96068) [skip ci]
2024-03-22Autoconf, CMake: Get the size of a void * and a time_tFrancois-Xavier Le Bail
With this change we know: whether this is a 32-bit or 64-bit build ; whether the time_t size is 32-bit or 64-bit. At least with CMake, the SIZEOF values could be 0, if somebody's doing a fat build on macOS and that includes both 32-bit and 64-bit instruction sets. (cherry picked from commit 170cbc8c6d484387ec7ae19ef9f4bd14dd0845e7)