summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* DVMRP: Update an error messageHEADmasterFrancois-Xavier Le Bail2023-05-151-1/+1
| | | | | This change will avoid having the keyword "invalid" twice as: [invalid ncount] (invalid)
* NSH: Update an error messageFrancois-Xavier Le Bail2023-05-151-1/+1
| | | | | This change will avoid having the keyword "invalid" twice as: (invalid length for the MD type) (invalid)
* RT6: Update an error messageFrancois-Xavier Le Bail2023-05-151-1/+1
| | | | | This change will avoid having the keyword "invalid" twice as: (invalid length nnn) (invalid)
* VTP: Update two error messagesFrancois-Xavier Le Bail2023-05-141-2/+2
| | | | | | | This change will avoid having the keyword "invalid" twice as: [invalid MgmtD Len nnn] (invalid) and (invalid TLV length nnn != 1) (invalid)
* DTP: Update an error messageFrancois-Xavier Le Bail2023-05-131-1/+1
| | | | | This change will avoid having the keyword "invalid" twice as : [invalid TLV length nnn] (invalid)
* mobile: Modernize packet parsingFrancois-Xavier Le Bail2023-05-121-5/+8
| | | | | | Use ND_TCHECK_SIZE() and enable ND_LONGJMP_FROM_TCHECK. Use ND_ICHECK_U() for length check and add standard "invalid" section. Use nd_print_protocol().
* Babel,DHCPv6: Use nd_print_protocol()Francois-Xavier Le Bail2023-05-122-2/+2
|
* checksum.c: Remove a now useless includeFrancois-Xavier Le Bail2023-05-101-1/+0
| | | | | It is a follow-up to 94f232c1ab0143c6da9fc00732b6b241b8abdf4c where the assert() call was removed.
* NTP: Remove three redundant tests with -vv optionFrancois-Xavier Le Bail2023-05-104-123/+0
| | | | | -vv does not give more printed data than -v for the NTP protocol. The only differences were about UDP checksums in IPv4 encapsulation.
* NTP: Remove three redundant tests with -vvv optionFrancois-Xavier Le Bail2023-05-104-123/+0
| | | | -vvv does not give more printed data than -vv.
* Makefile.in: Use the variable MAKE instead of the make commandFrancois-Xavier Le Bail2023-05-081-8/+8
| | | | | | | | | | | | | | | | From https://www.gnu.org/software/make/manual/make.html#MAKE-Variable: ``` Recursive make commands should always use the variable MAKE, not the explicit command name 'make', as shown here: subsystem: cd subdir && $(MAKE) ``` This should avoid the following warning when running 'make releasecheck' in some cases: make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
* Cirrus CI: Fix FreeBSD 13 and update Linux. [skip appveyor]Denis Ovsienko2023-05-081-4/+5
| | | | | | | Same as in tcpslice: pkg: No packages available to install matching 'llvm14' have been found in the repositories
* tcpdump.1.in: Delete Linux 2.0 referencesJesse Rosenstock2023-05-071-18/+0
| | | | | | | | | Delete Linux 2.0 bugs from bug list. Linux 2.0.x releases are from 1996-2004. The man page recommended upgrading to Linux 2.2, released in 1999. https://en.wikipedia.org/wiki/Linux_kernel_version_history#Releases_up_to_2.6.0 I'm assuming these >20 year old bug references aren't that useful now.
* instrument functions: Reduce the scope of a variableFrancois-Xavier Le Bail2023-05-031-1/+2
| | | | | | Fix the cppcheck warning: instrument-functions.c:77:15: warning: The scope of the variable 'instrument_type' can be reduced. [variableScope]
* lwres: Fix an undefined behavior in pointer arithmeticBill Fenner2023-05-024-1/+5
| | | | | | | | | | | Check for truncation before doing pointer arithmetic to point to the end of the packet. print-lwres.c:294:10: runtime error: addition of unsigned offset to 0xf3b032be overflowed to 0x9652d560 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior print-lwres.c:294:10 [Part of the PR #1012]
* CI: Copy build_common.sh from tcpslice. [skip ci]Denis Ovsienko2023-05-011-0/+1
|
* Cirrus CI: Avoid perl warnings about setting locale, Linux taskFrancois-Xavier Le Bail2023-04-301-0/+1
| | | | | | | | | | | The warnings were like: perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C").
* NHRP: Fix typos in a comment. [skip ci]Denis Ovsienko2023-04-281-2/+2
|
* PPP: Check if there is some data to hexdumpFrancois-Xavier Le Bail2023-04-274-1/+23
| | | | | | | | This may avoid this error: Dissector error: print_unknown_data() called with pointer past end of packet Add a test file showing the problem.
* RIP: Check if there is some data to hexdumpFrancois-Xavier Le Bail2023-04-274-1/+8
| | | | | | This may avoid this error: Dissector error: print_unknown_data() called with pointer past end of packet
* nhrp: fix infinite loop on malformed packets.Guy Harris2023-04-254-0/+13
| | | | | | | | If a CIE doesn't fit in the remainder of the mandatory part, return the length of that remainder, so that the loop processing the CIE terminates. Add capture that produced the infinite loop.
* Fix a typoFrancois-Xavier Le Bail2023-04-221-1/+1
| | | | [skip ci]
* Put "}" at beginning of line with "else" to keep a consistent styleFrancois-Xavier Le Bail2023-04-2122-84/+42
| | | | [skip ci]
* Put "{" at end of line with "else" to keep a consistent styleFrancois-Xavier Le Bail2023-04-213-12/+6
| | | | [skip ci]
* Put "{" at end of line with "switch" to keep a consistent styleFrancois-Xavier Le Bail2023-04-195-22/+11
| | | | [skip ci]
* Put "{" at end of line with "if" to keep a consistent styleFrancois-Xavier Le Bail2023-04-196-76/+38
| | | | [skip ci]
* Put "{" at end of line with "for" to keep a consistent styleFrancois-Xavier Le Bail2023-04-193-8/+4
| | | | [skip ci]
* Put "{" at end of line with "while" to keep a consistent styleFrancois-Xavier Le Bail2023-04-193-12/+6
| | | | [skip ci]
* SNMP: Fix two undefined behaviorsBill Fenner2023-04-197-3/+12
| | | | | | | | | | | | | | | | | | | When converting an integer from ASN.1, use an unsigned value for the partial result and assign it to the integer part of the union at the end, to avoid shifting a negative number left. print-snmp.c:545:19: runtime error: left shift of negative value -1 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior print-snmp.c:545:19 OID elements are unsigned; a large-enough oid value could result in the undefined behavior of shifting a signed integer left through the sign bit, so simply store them as unsigned. print-snmp.c:751:11: runtime error: left shift of 268435455 by 7 places cannot be represented in type 'int' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior print-snmp.c:751:11 [Part of the PR #1012]
* Merge pull request #972 from martinetd/zombiefxlb2023-04-191-1/+1
|\ | | | | child_cleanup: reap as many child processes as possible
| * child_cleanup: reap as many child processes as possibleDominique Martinet2023-04-191-1/+1
|/ | | | | | | | | | | | | Under load it's possible multiple child processes have been killed before we start processing the SIGCHILD signal, leaving zombie processes behind everytime we miss a process. Reap as many processes as possible instead of assuming one handler call = one process like we currently did. Can be reproduced by running the following commands in parallel: - tcpdump -i lo -w /tmp/test -C 1 -z /usr/bin/true - iperf3 -s - iperf3 -c localhost
* RT6: Print SRH TLV HMAC "reserved" field if non zero in verbose modeFrancois-Xavier Le Bail2023-04-181-0/+2
| | | | reserved: MUST be 0 (MBZ).
* RT6: Declare the struct tok srh_tlv_type "static"Francois-Xavier Le Bail2023-04-181-1/+1
| | | | | | | | | | | | This should avoid error like: ./print-rt6.c:36:18: error: no previous extern declaration for non-static variable 'srh_tlv_type' [-Werror,-Wmissing-variable-declarations] const struct tok srh_tlv_type[] = { ^ ./print-rt6.c:36:7: note: declare 'static' if the variable is not intended to be used outside of this translation unit const struct tok srh_tlv_type[] = { ^
* RT6: Use a "struct tok" for the SRH TLV typeFrancois-Xavier Le Bail2023-04-181-10/+13
| | | | | Moreover: Factorise "ND_PRINT(", TLV-len=%u", tlv_len);"
* Merge pull request #949 from giulio-sido/tmp3fxlb2023-04-189-9/+108
|\ | | | | rt6: parse TLV
| * rt6: parse TLVgiulio-sido2023-04-189-9/+108
|/ | | | | | | | | Parse Type Length Values (TLV) in IPv6 Routing Header as specified by RFC 8754 [1]. [1] https://datatracker.ietf.org/doc/html/rfc8754 Signed-off-by: Giulio Sidoretti <giulio.sidoretti@uniroma2.it>
* EAP: Assign ndo_protocol in the eap_print() functionFrancois-Xavier Le Bail2023-04-121-0/+1
|
* nhrp: handle draft-detienne-dmvpn-01, improve indication decoding.Guy Harris2023-04-122-5/+34
| | | | | | | | | | Handle the I-D draft-detienne-dmvpn-01 traffic indication packet. Print the error code in an error indication symbolically if it's a known code. Print the address fields in the mandatory part of the header for error and traffic indication packets.
* Geneve: Add a bounds checkFrancois-Xavier Le Bail2023-04-111-1/+2
|
* nhrp: add casts to squelch narrowing warnings.Guy Harris2023-04-111-5/+6
| | | | Get rid of some commented-out code while we're at it.
* Add support for dissecting RFC 2332 NHRP.Guy Harris2023-04-1118-0/+583
| | | | This is from the OpenBSD tcpdump.
* cdp: require that the Address TLV have at least 4 bytes of data.Guy Harris2023-04-101-5/+1
| | | | | Specify a minimum length of 4 in the cdptlvs table, rather than having its printer do the length check itself.
* cdp: show the TLV type as a 4-digit hex number.Guy Harris2023-04-104-130/+130
| | | | It's 2 bytes long.
* cdp: support CDP TLV 0x001a.Guy Harris2023-04-103-14/+25
| | | | Based on the way it's dissected in Wireshark.
* cdp: don't explicitly check for T_DEV_ID when printing.Guy Harris2023-04-101-31/+43
| | | | | | | | | Instead, have an additional element in a struct cdp_tlvinfo that indicates whether to print the TLV in all modes or only in verbose mode; that would allow other TLVs to printed in non-verbose mode. Also, use the usual (sizeof x / sizeof x[0]) trick to determine how big the table is, rather than having a defined size.
* bootp/dhcp6: DHCPv4/v6 ZTP and SZTP option supportEamon Doyle2023-04-106-0/+158
| | | | | | | | DHCPv4: RFC8572 specifies the SZTP redirect tag. DHCPv6: RFC5970 specifies the boot file URL, used for ZTP, and RFC8572 specifies the SZTP redirect tag The base DHCPv6 RFC3315 specifies the user class option.
* gre: support CDP over GRE.Guy Harris2023-04-102-2/+34
| | | | Taken from the OpenBSD version of tcpdump.
* tests: wccp_redirect_gre.pcap contains SMB, so it needs two tests.Guy Harris2023-04-104-4/+22
| | | | | Have separate .out files for dissection of wccp_redirect_gre.pcap with, and without, SMB dissection enabled in tcpdump.
* cdp: only hex-dump unknown TLVs in verbose mode.Guy Harris2023-04-101-1/+1
| | | | | | | | | | | | | | If we're not in verbose mode, we only show the Device ID TLV, so there's no good reason to show a hex dump of other TLVs if we don't happen to have a printer for them - especially given that we don't show the type value for the TLV, so it's not clear to what type value those hex bytes correspond. Furthermore, the hex dump causes the non-verbose output to be multiple lines, and causes the ", length N" to show up at the end of the hex dump rather than at the end of the first line. I.e., it seems as if either 1) printing the hex dump in non-verbose mode wasn't intended or 2) it was intended by whoever intended it didn't look into what it would involve.
* GRE: Refine the WCCP header commit. [skip ci]Denis Ovsienko2023-04-092-4/+4
| | | | | | | | Fixup the comment and have the case block actually fall through consistently with the comment and the OpenBSD implementation. Update the test case, which now has the IPv4 packet after the WCCP header. The indentation does not represent the header nesting, but the same stands for the OpenBSD implementation.