summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* gre: handle Network Service Header (NSH), RFC 8300Guy Harris2023-04-081-0/+3
| | | | | This, and the previous multicast MPLS change, come from the OpenBSD tcpdump.
* gre: handle multicast MPLS.Guy Harris2023-04-081-0/+1
| | | | Pass ETHERTYPE_MPLS_MULTI packets to the MPLS dissector.
* gre: add support for WCCP redirects over GRE.Guy Harris2023-04-086-0/+376
| | | | | | | Add a test capture for it - and for GRE keepalives. Both this and the previous GRE keepalive changes are based on OpenBSD code.
* gre: recognize (Cisco?) GRE keepalives.Guy Harris2023-04-081-0/+8
| | | | | The RFCs don't seem to mention this use, but Cisco, at least, uses packets with a protocol value of 0x0000 as keepalives.
* gre: expand a comment, mention NVGRE. [skip ci]Guy Harris2023-04-081-2/+24
| | | | | When processing the key field, note that OpenBSD shows it both a a 32bit key and an NVGRE VSID+FlowID.
* CHANGES: Synchronize the 4.99.x sections. [skip ci]Denis Ovsienko2023-04-071-2/+5
|
* CHANGES: Add a change backported to 4.99Francois-Xavier Le Bail2023-04-071-0/+1
|
* Update config.{guess,sub}, timestamps 2023-01-01,2023-01-21Francois-Xavier Le Bail2023-04-062-11/+34
| | | | From repository git://git.savannah.gnu.org/config.git
* CHANGES: List more backported commits. [skip ci]Denis Ovsienko2023-04-021-0/+5
| | | | (cherry picked from commit af4b5f75370f521f96326f0d9469031a0a0a595d)
* Merge pull request #1039 from mspncp/ikev2-add-missing-notification-typesMichael Richardson2023-04-021-43/+310
|\ | | | | IKEv2: add missing notification types
| * IKEv2: add missing notification typesMatthias St. Pierre2023-03-051-43/+310
| | | | | | | | | | | | | | | | The notification type entries were crafted from the CSV files provided by IANA for the [error types] resp. [status types]. [error types]: https://www.iana.org/assignments/ikev2-parameters/ikev2-parameters-14.csv [status types]: https://www.iana.org/assignments/ikev2-parameters/ikev2-parameters-16.csv
* | Autoconf: Update a stale comment in aclocal.m4. [skip ci]Denis Ovsienko2023-03-271-1/+1
| |
* | Autoconf: Fix --static-pcap-only test on Solaris 10. [skip appveyor]Denis Ovsienko2023-03-262-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Solaris 10 /usr/bin/grep does not implement the -q flag: checking for pcap-config... ../libpcap/pcap-config grep: illegal option -- q Usage: grep -hblcnsviw pattern file . . . checking for pcap_loop... yes Follow recommendation of the "Limitations of Usual Tools" section of GNU Autoconf manual and use output redirection to fix it: checking for pcap-config... ../libpcap/pcap-config checking for pcap_loop... yes
* | doc: Add more Solaris-related particulars. [skip ci]Denis Ovsienko2023-03-181-0/+12
| |
* | man: Format "output format" subsections properly. [skip ci]Denis Ovsienko2023-03-181-29/+17
| |
* | Cirrus CI: Configure with --enable-instrument-functions, Coverity taskcoverity_scanFrancois-Xavier Le Bail2023-03-131-2/+2
| | | | | | | | | | | | Add the required binutils-dev package. [skip ci]
* | instrument functions: Use an environment variable instead of config filesFrancois-Xavier Le Bail2023-03-134-56/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the environment variable INSTRUMENT is - unset or set to an empty string, print nothing, like with no instrumentation - set to "all" or "a", print all the functions names - set to "global" or "g", print only the global functions names The configuration with --enable-instrument-functions remains. Note that before this change, the default was to print all functions. Now it is to print nothing. So by default 'make check' runs without errors. This allows to run: $ INSTRUMENT=a ./tcpdump ... $ INSTRUMENT=g ./tcpdump ... $ INSTRUMENT= ./tcpdump ... or $ export INSTRUMENT=global $ ./tcpdump ... This also allows to run the statically compiled binary on another host after copying it. It is no longer necessary to modify the configuration with: $ make instrument_all $ make instrument_global $ make instrument_off (Targets removed.) Update .gitignore, CONTRIBUTING.md and Makefile.in accordingly. Moreover: Reduce the scope of a variable. Rename a variable. Remove '\n' in the perror() call. Remove 2 spaces in function calls (style). [skip ci]
* | man: Spell TCP header flags names. [skip ci]Denis Ovsienko2023-03-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | In the prose use the names from respective registry [1], which says: * "PSH", not "PUSH", * "CWR", not "ECN CWR", and * "ECE", not "ECN-Echo". This does not resolve all known inconsistencies related to TCP flags, but at least makes the problem smaller. 1: https://www.iana.org/assignments/tcp-parameters/tcp-parameters.xhtml
* | instrument functions: Add a NULL checkFrancois-Xavier Le Bail2023-03-111-1/+2
| | | | | | | | | | | | | | | | Same as in tcpslice to fix a Coverity issue. The issue was: Null pointer dereferences (FORWARD_NULL) Passing null pointer "func" to "strncmp", which dereferences it.
* | instrument functions: Add a length checkFrancois-Xavier Le Bail2023-03-111-1/+6
| | | | | | | | | | | | | | | | | | We need space for the '\0'. Same as in tcpslice to fix a Coverity issue. Moreover: Use '\0' for the null character.
* | Refine the patterns in .gitignore. [skip ci]Denis Ovsienko2023-03-051-21/+19
|/ | | | | Spell patterns that are supposed to apply at the source tree root only and remove two patterns that already appear in tests/.gitignore.
* Get Markdown right in the previous change. [skip ci]Denis Ovsienko2023-03-041-1/+1
| | | | HTML 3 had problems, but confusing italic for bold was not one of them.
* Fix minor issues in INSTALL.md. [skip ci]Denis Ovsienko2023-03-041-5/+5
|
* Makefile.in: Add instrument-functions.o in CLEANFILESFrancois-Xavier Le Bail2023-03-011-1/+2
| | | | | | It is not in LIBNETDISSECT_OBJ because it is optionally built. [skip ci]
* Makefile.in: Add print-smb.o and smbutil.o in CLEANFILESFrancois-Xavier Le Bail2023-03-011-1/+1
| | | | | | They are not in LIBNETDISSECT_OBJ because they are optionally built. [skip ci]
* Cirrus CI: Configure with --enable-smb in the Coverity taskFrancois-Xavier Le Bail2023-02-271-1/+1
|
* Rename a test. The protocol is IEEE 802.11Francois-Xavier Le Bail2023-02-273-1/+1
|
* man: Add the TCP flag names tcp-ece and tcp-cwrFrancois-Xavier Le Bail2023-02-261-1/+8
| | | | | State that these flag names became available when linking with libpcap 1.9.0 or later.
* doc: Update Haiku particulars. [skip ci]Denis Ovsienko2023-02-261-0/+16
| | | | Add a section for the 32-bit version.
* Untangle detection of pcap_findalldevs().Denis Ovsienko2023-02-252-31/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tcpdump.c requires both HAVE_PCAP_IF_T and HAVE_PCAP_FINDALLDEVS to manage the code that depends on pcap_findalldevs(). Other than that, the Autoconf and CMake checks that produce these two macros do not relate directly, so having the check for pcap_if_t conditional on the check for pcap_findalldevs() is an unnecessary complication. More importantly, in the CMake case this places the check_type_size() for pcap_if_t into a context with CMAKE_REQUIRED_LIBRARIES already set to PCAP_LIBRARIES. This works only if check_type_size() does not have to check for <sys/types.h>, <stdint.h> or <stddef.h> implicitly. This was the case so long as another check_type_size() before the CMAKE_REQUIRED_LIBRARIES change made the implicit checks and cached the results, but removing that earlier instance resulted in a warning: Policy CMP0075 is not set: Include file check macros honor CMAKE_REQUIRED_LIBRARIES. Run "cmake --help-policy CMP0075" for policy details. Use the cmake_policy command to set the policy and suppress this warning. CMAKE_REQUIRED_LIBRARIES is set to: /usr/lib/x86_64-linux-gnu/libpcap.so For compatibility with CMake 3.11 and below this check is ignoring it. To fix that, in both Autoconf and CMake make the two checks separate and unconditional and place the check for pcap_if_t where it fits better. In CMake remove the earlier workaround with in6_addr.
* CI: Introduce TEST_RELEASETAR. [skip ci]Denis Ovsienko2023-02-251-1/+4
| | | | Same as in tcpslice and libpcap.
* tcpdump.c: fix a comment. [skip ci]Guy Harris2023-02-251-1/+1
| | | | | | | Some versions of Mac OS X (as it was then called) *did*, in fact, ship with a libpcap that had pcap_findalldevs() but a pcap.h that didn't define pcap_if_t; it's not a question of "may ship", it's a fact of "did ship".
* State there are currently no OS dependent defines and prototypesFrancois-Xavier Le Bail2023-02-241-1/+1
| | | | | The last header was removed by commit 6008cb83b72a8fafe9c69f6955f4bdffbc049a09.
* CMake: balance cmake_push_check_state() and cmake_pop_check_state().Guy Harris2023-02-221-0/+1
| | | | | We didn't completely pop the check state after we finished the checks for libpcap.
* Detect OS IPv6 support using AF_INET6 only.Denis Ovsienko2023-02-227-86/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | tcpdump source code has not been using struct in6_addr since commit 0c9cfdc in 2019, so lose the conditional structure declaration, which is a no-op. Since commit de7c619 in 2015 netdissect-stdinc.h on Windows defines HAVE_OS_IPV6_SUPPORT if AF_INET6 if defined, which makes it equivalent to AF_INET6. On Unix-like systems taking struct in6_addr out of scope would make HAVE_OS_IPV6_SUPPORT equivalent to AF_INET6, thus after removing struct in6_addr remove HAVE_OS_IPV6_SUPPORT together with Autoconf and CMake checks that define it. Leave an unrelated CMake workaround in place for later debugging. On Windows do not define AF_INET6 if it is not defined, which makes AF_INET6 a universal indicator of the OS IPv6 support on all supported OSes. The few remaining use cases that genuinely need AF_INET6 use it to make OS API calls, so if the macro is not defined, it most likely means such an API call in the best case would return just a well-formed error status. With this in mind, in win32_gethostbyaddr() and ip6addr_string() guard all IPv6-specific code with #ifdef AF_INET6. In tcpdump.c add a comment to note why a guard is not required for Casper-specific conditional code that uses AF_INET6. This way when the OS does not support IPv6, IPv6 addresses will not resolve to names, which is expected. Other than that, tcpdump should be able to process IPv6 addresses the usual way regardless if the OS would be able to process the packets with these addresses.
* Switch print-isoclns.c to AFNUM_ code points. [skip ci]Denis Ovsienko2023-02-221-12/+13
| | | | | Same as in other printers just before, since this use case is neither the OS API nor the wire encoding,
* Autoconf: Remove detection of early IPv6 stacks. [skip appveyor]Denis Ovsienko2023-02-212-118/+1
| | | | | | | | The KAME/INRIA/etc. block has been around since commit c9d84d1 in 1999, when it was common for IPv6 stacks to exist and develop separately from operating systems. During the next 10 or so years IPv6 support in various operating systems became the norm and the stack detector became obsolete. Remove it and continue to use libc IPv6 implementation.
* Rename AF_INET{6} to AF_IP{6}.Guy Harris2023-02-209-88/+88
| | | | | That matches the descriptiions in the registry, and indicates that they don't correspond to any AF_ values.
* Rename the BSD_AFNUM_ values to BSD_AF_.Guy Harris2023-02-206-35/+35
| | | | | | They correspond to OS socket API AF_ values, which are distinct from address family numbers in the IANA registry at https://www.iana.org/assignments/address-family-numbers/address-family-numbers.xhtml
* pim: use af.h values for the address family.Guy Harris2023-02-201-11/+11
| | | | | | Use them in the case statement testing the address family from the packet, and use them, rather than AF_ values, to indicate the address family from the packet.
* CHANGES: Add a change backported to 4.99Francois-Xavier Le Bail2023-02-201-0/+1
| | | | [skip ci]
* CHANGES: Move a change backported to 4.99Francois-Xavier Le Bail2023-02-201-1/+1
| | | | [skip ci]
* Do not substitute strdup().Denis Ovsienko2023-02-198-69/+3
| | | | | | | | | | | | libpcap has been using strdup() for a long time too, but never substituted it under the assumption the function is available in all supported OSes, see libpcap commit cb71eef from 2006. The only exception to that is Windows, which can have a different name for the function, but both libpcap and tcpdump for that already use a separate workaround, which does not involve the substitution. Let's take this as a proof that strdup() substitution in tcpdump is dead code, and remove it.
* Simplify conditional branching in diag-control.h.Denis Ovsienko2023-02-191-23/+28
| | | | (Same as in tcpslice and libpcap.)
* Geneve: Fix the Geneve UDP port testFrancois-Xavier Le Bail2023-02-171-1/+1
| | | | GENEVE_PORT (6081) is a destination port.
* instrument functions: Minimize stat() callsFrancois-Xavier Le Bail2023-02-171-1/+8
| | | | | | | This change decreases the execution time when the file indicating that instrumentation is "off" exists. [skip ci]
* Lose Digital UNIX 4.x prototype header.Denis Ovsienko2023-02-172-25/+0
| | | | | | | The final 4.x release 4.0F dates back to 1999, and the only prototypes in the header are snprintf(), which became available in Tru64 UNIX 5.0 (as far as libpcap lbl/os-osf5.h mentions it), and vsnprintf(), which tcpdump does not use any more.
* Do not require vsnprintf().Denis Ovsienko2023-02-172-12/+6
| | | | | | | The check for vsnprintf() has been in the configure script since commit 8cb054c in 2000, and the only actual use of the function was in the "#ifndef HAVE_SNPRINTF" block in missing/snprintf.c until commit 1ed63b5 in 2019. Since then tcpdump does not require vsnprintf() in any way.
* Require a proof of suitable snprintf(3) implementation.Denis Ovsienko2023-02-166-165/+122
| | | | | | | | | | | My earlier commit fbd4415 did a wrong thing because it caused a failure to fail in "make check" on Solaris 9, whereas the right thing to do when printf() does not work as expected would be to fail the build with a useful error message. Implement that by testing snprintf() in Autoconf and CMake (assume that in a given libc implementation all functions in the printf() family have the same level of support for conversion specifications). Return 18 tests from the conditional space back into TESTLIST.
* RIPng: Print the protocol name when the version is invalidFrancois-Xavier Le Bail2023-02-162-2/+3
| | | | Update the output of a test accordingly.