summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* UDP: Clean up address and port printing.Denis Ovsienko2021-01-132-68/+37
| | | | | | | | udp_print() always knows whether UDP port numbers are available or not, so split udpipaddr_print() into two functions to lose some arity, much branching and all type casting. In the new functions test for IPv4 explicitly. In udp_print() convert duplicate code into a conditional call to udpipaddr_print().
* EGP: Modernize packet parsing style.Denis Ovsienko2021-01-112-12/+17
| | | | Enable ND_LONGJMP_FROM_TCHECK. Report invalid packets as invalid.
* Mention the recent EIGRP changes.Denis Ovsienko2021-01-111-1/+2
|
* SLIP: Remove 4 ND_TCHECK_SIZE() callsFrancois-Xavier Le Bail2021-01-101-4/+0
| | | | IP_HL() and TH_OFF() macros use GET_U_1().
* travis_terminate *causes* the problem on macOS; use it only on Linux.Guy Harris2021-01-091-1/+4
| | | | More fun in the new world.
* EIGRP: Modernize packet parsing style.Denis Ovsienko2021-01-102-28/+24
| | | | | | | | Enable ND_LONGJMP_FROM_TCHECK. Report invalid packets as invalid. Remove two redundant ND_TCHECK_*() instances. When giving up on a packet for whatever reason, test that the rest of it is within the buffer. Do the header length check before accessing any header data and refine the TLV length checks. Update a test.
* EIGRP: Get the packet header fields right.Denis Ovsienko2021-01-096-112/+116
| | | | | | | In the spec the packet diagram instead of a 32-bit AS number shows a 16-bit virtual router ID followed by a 16-bit AS number, implement that. Also add two missing flag values and use bittok2str() to print the bitmask. Lose a stale comment and update some tests.
* Travis CI: Fix a typo in a commentFrancois-Xavier Le Bail2021-01-091-1/+1
| | | | [skip ci]
* Remove the no more used nd_print() functionFrancois-Xavier Le Bail2021-01-092-28/+0
| | | | | The function to use now is: nd_printjnp(). (Added by commit 635e3cc92b72ca048a6b5b89b883980e4e1b4bdc)
* Travis: use travis_terminate instead of exit in script:.Guy Harris2021-01-081-1/+1
| | | | | That was the Travis maintainer's recommendation to fix the hang we were seeing on non-x86-64 Linux coverity_scan builds.
* Remove debugging printouts.Guy Harris2021-01-081-10/+0
| | | | | | | | | | | | | | | | | | | | The problem appears to be with the if [ "$COVERITY_SCAN_BRANCH" = 1 ]; then exit 0; fi line in the script: section of .travis.yml; libpcap has the line if [ "$COVERITY_SCAN_BRANCH" = 1 ]; then echo "Coverity build - nothing more to do"; exit 0; fi and also fails, so exiting without a message isn't the problem, and when I tried adding if [ "$COVERITY_SCAN_BRANCH" = 0 ]; then echo "Non-Coverity build - pstill nothing more to do"; exit 0; fi and the ppc64le Linux builds were failing with a timeout rather than just doing nothing - the AMD64 Linux didn't have a problem, so there's something different about the non-x86-64 builds that's causing the "exit 0" stuff not to work.
* Replace the (void)nd_printn(..., NULL) calls by nd_printjn() callsFrancois-Xavier Le Bail2021-01-0813-22/+21
| | | | | Moreover: Remove a now useless comment.
* Add a nd_printjn() functionFrancois-Xavier Le Bail2021-01-082-0/+18
| | | | | | | | It prints a counted filename (or other ASCII string), part of the packet buffer, filtering out non-printable characters. Stop if truncated (via GET_U_1/longjmp) or after n bytes, whichever is first. The suffix comes from: j:longJmp, n:after N bytes.
* Travis CI: Add a folded 'ldd tcpdump' (Linux builds)Francois-Xavier Le Bail2021-01-081-0/+3
|
* Travis CI: Add 'echo '$ cmake [...]' to the folded cmakeFrancois-Xavier Le Bail2021-01-081-1/+1
| | | | With this change the output can be unfolded.
* Travis/Coverity: put some debugging printouts into coverity-scan-build.Guy Harris2021-01-081-0/+10
|
* Travis: we should no longer need to set PKG_CONFIG_PATH for CMake.Guy Harris2021-01-081-1/+1
| | | | | | | | | | FindPCAP.cmake should now pick up directories from CMAKE_PREFIX_PATH and add the corresponding pkgconfig directories to PKG_CONFIG_PATH before running pkg-config, so we shouldnt need to set PKG_CONFIG_PATH ourselves. We still need to do it when running the autoonf script, as there's no equivalent for CMAKE_PREFIX_PATH in autoconf.
* CMake: add stuff from CMAKE_PREFIX_PATH to PKG_CONFIG_PATH.Guy Harris2021-01-082-0/+109
| | | | | | | | | | | | | Pull in some code from CMake 3.12.4's FindPkgConfig.cmake to arrange that, when running pkg-config, directories from CMAKE_PREFIX_PATH are in the PKG_CONFIG_PATH environment variable. We do this because we want to make sure that, if CMAKE_PREFIX_PATH is set, and it points to a directory that contains a libpcap that has a .pc file installed, we get that .pc file, but we don't yet want to require a minimum of CMake 3.1 or later (CMake 3.1 and later do that automatically) because there might be some long-term support OS version that comes with an older version of CMake.
* BOOTP: Modernize packet parsing style.Denis Ovsienko2021-01-082-56/+24
| | | | | | Enable ND_LONGJMP_FROM_TCHECK. Report invalid packets as invalid. Have nd_printn() and nd_printztn() guard the snapshot end. Replace client_fqdn_flags() with bittok2str_nosep().
* Point the configure script at the installed pkg-config directory in /tmp.Guy Harris2021-01-071-1/+1
| | | | | | Getting the configure script to look for the temporarily-installed libpcap.pc file requires that we set PKG_CONFIG_PATH to /tmp/lib/pkgconfig.
* Point cmake at the installed pkg-config directory in /tmp.Guy Harris2021-01-071-6/+5
| | | | | | | | | Getting CMake to look for the temporarily-installed libpcap.pc file requires that we set PKG_CONFIG_PATH to /tmp/lib/pkgconfig; otherwise, the configuration process won't find it, and hilarity ensues. Try turning the 'BUILD_LIBPCAP=yes CMAKE=yes' builds on, to see if that fixes them.
* Denis has made changes to the 5.0.0 entry in CHANGES as well.Guy Harris2021-01-071-1/+1
| | | | [skip ci]
* Update a comment.Guy Harris2021-01-071-4/+3
| | | | | | | Apple's released ARM-based Macs, so it's no longer just a possibility. (Travis doesn't have any, so we don't add an arm64 build for macOS.) [skip ci]
* ICMP: Fix a typo in a comment.Denis Ovsienko2021-01-071-1/+1
|
* L2TP: Modernize packet parsing style.Denis Ovsienko2021-01-062-14/+18
| | | | | Enable ND_LONGJMP_FROM_TCHECK. Report invalid packets as invalid with a reason, not truncated.
* TESTrun: Show tcpdump version used for testsFrancois-Xavier Le Bail2021-01-061-0/+2
|
* MPLS: rename the "exp" field to "tc"Bill Fenner2021-01-0620-103/+103
| | | | | | RFC5462 (https://tools.ietf.org/html/rfc5462) renamed the MPLS "EXP" field to "Traffic Class" in 2009. Use "tc" as an abbreviation for this field name.
* Replace ND_TCHECK_/memcpy() pairs with GET_CPY_BYTES().Guy Harris2021-01-055-71/+16
| | | | | | | | | For BGP, this eliminates some cases where routines return -1 on truncation; clean up after that. This also means that some memcpy()s get replaced by UNALIGNED_MEMCPY(), which may fix some issues on processors that don't support unaligned accesses.
* Geneve: Modernize packet parsing style.Denis Ovsienko2021-01-062-23/+39
| | | | | | | | | Enable ND_LONGJMP_FROM_TCHECK. Remove one redundant ND_TCHECK_*() instance and make another one conditional. Report invalid packets as invalid. Test that a non-Ethernet payload is fully within the packet buffer. Add a length check to geneve_opts_print() and have it indicate invalid tunnel options. Constify an argument. Update the packet diagrams and refer to the RFC rather than the draft.
* Add tests for more code coverage in timestamp printing functionsFrancois-Xavier Le Bail2021-01-0514-0/+54
| | | | | | Use a TCP 3-Way Handshake test, nano precision. Display micro outputs and nano outputs (with -q).
* Remove '-t' option for MACsec testsFrancois-Xavier Le Bail2021-01-058-14/+14
| | | | like all the other tests.
* Add an entry for the trunk changes so far that are not in 4.99.Guy Harris2021-01-031-0/+7
|
* Add an entry for the 4.99 branch changes so far.Guy Harris2021-01-031-0/+8
|
* Fix a warning on Linux AlpineFrancois-Xavier Le Bail2021-01-021-1/+4
| | | | | | | | | | | | | | | | The warning was like: In file included from ./netdissect-stdinc.h:42, from ./fptype.c:36: ./ftmacros.h:116: warning: "_BSD_SOURCE" redefined 116 | #define _BSD_SOURCE | In file included from /usr/include/stdio.h:8, from /usr/include/fortify/stdio.h:22, from ./fptype.c:34: /usr/include/features.h:15: note: this is the location of the previous definition 15 | #define _BSD_SOURCE 1 |
* Travis CI: Remove capture on architecture arm64 (not always working)Francois-Xavier Le Bail2021-01-021-1/+1
|
* Makefile.in: Run 'autoreconf -f' when buiding releaseFrancois-Xavier Le Bail2021-01-021-1/+2
| | | | | | | Same as for libpcap. It's needed to update configure (PACKAGE_VERSION, PACKAGE_STRING, etc.) when VERSION is updated.
* Fix a build problem on the Linux Travis CI buildbot.Guy Harris2021-01-021-1/+7
| | | | | | | | | | | | | The buildbot is failing in autotools builds - but not in CMake builds; go figure. Perhaps they're passing different flags to the C compiler, and, in the autotools builds, the flag causes the compiler to define whatever it takes to get /usr/include/features.h to define _DEFAULT_SOURCE as 1, so that our defining it as nothing collides with that. (Dear UN*X community: please come up with a platform-independent, reliable way of saying "expose every single API you have, namespace pollution be damned. kthxbye.)
* Add ftmacros.h, defining various feature test macros, and use it.Guy Harris2021-01-013-0/+116
| | | | | | | | This attempts to ensure that we get all the APIs for the platform declared, including the ones that, shock horror, "pollute the namespace". This fixes some compile failures with Sun C on Solaris 11.
* Use %zu when printing a sizeof.Guy Harris2021-01-011-3/+3
| | | | | | | We require a C implementation that supports %z, so we can use it; there is no guarantee that a sizeof is a long, so don't use %l. Squelches warnings found on Solaris 11 with GCC.
* Squelch some signed vs. unsigned warnings.Guy Harris2021-01-012-2/+2
| | | | They showed up on 64-bit OpenBSD 6.6.
* OLSR: Modernize packet parsing style.Denis Ovsienko2021-01-021-36/+30
| | | | | | Enable ND_LONGJMP_FROM_TCHECK. Remove a few redundant ND_TCHECK_*() instances. Report invalid packets as invalid with a reason, not truncated. Make helper functions void and lose associated checks.
* EGP: Replace custom code with tok2str().Denis Ovsienko2021-01-021-74/+54
|
* PGM: Modernize packet parsing style.Denis Ovsienko2021-01-021-14/+11
| | | | | | Enable ND_LONGJMP_FROM_TCHECK. Remove a few redundant ND_TCHECK_*() instances. Report invalid packets as invalid, not truncated. Update a custom snapshot end guard to call nd_trunc_longjmp().
* RSVP: Modernize packet parsing style.Denis Ovsienko2021-01-011-19/+11
| | | | | Enable ND_LONGJMP_FROM_TCHECK. Remove a few redundant ND_TCHECK_*() instances. Report invalid packets as invalid with a reason.
* Travis CI: Use Linux Focal (Ubuntu 20.04)Francois-Xavier Le Bail2021-01-011-2/+1
| | | | gcc 9.3.0 (on Bionic was 7.5.0)
* fixed date in CHANGES fileMichael Richardson2020-12-311-1/+1
|
* bumped version on masterMichael Richardson2020-12-312-10/+10
|
* CHANGES: Add the dateFrancois-Xavier Le Bail2020-12-311-1/+1
|
* Revert "added some references and missing CVE to CHANGES"Francois-Xavier Le Bail2020-12-301-3/+0
| | | | | | | | | This reverts commit 8a3252dfe59a944537826c73194e644c2d5fd62f. The duplicate CVEs was removed by 23be4d12401b000874c3aa0a5104e54ba39a3d02. The inexistant URL was removed by c29dbf9b4f1a6350aeff6be1dd75ae32c34a055d. [skip ci]
* added some references and missing CVE to CHANGESMichael Richardson2020-12-291-0/+3
|