Commit Graph

426 Commits

Author SHA1 Message Date
ishaangandhi
dbf0433fef Add dissector for ICMP Interface Identification Object 2021-07-13 19:02:32 +00:00
Davide Caratti
1ac47641c5 mptcp: add support for MP_TCPRST
dissect the MP_TCPRST sub-option in accordance to RFC8684 §3.6.

Link: https://github.com/multipath-tcp/mptcp_net-next/issues/189
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
2021-07-12 10:51:58 +02:00
Francois-Xavier Le Bail
e4adb4b6e1 Rename a test. It's about the AppleTalk protocol 2021-07-10 20:57:07 +02:00
Neelabh
7b4e6191a7 Add support for IPv6 agent in sFlow. 2021-05-17 14:52:12 +00:00
Denis Ovsienko
0f19351efd Don't try to run the DLT_RAW test on OpenBSD.
With this change tcpdump passes "make check" on OpenBSD 6.8 AMD64.
2021-03-17 11:55:17 +00:00
Bill Fenner
6c002d33c0 BFD: add SBFD support (RFC7880 and RFC7881)
Add support for SBFD on UDP port 7784.  SBFD is different
in that packets from the reflector will be sent with *source*
port 7784; in all other BFD mechanisms, it is only the
destination port that matters.  For SBFD print-udp.c has to
check both source and destination port.
2021-02-14 15:08:33 +00:00
ckishimo
c86534460a ospf: add support bit Nt RFC3101 2021-01-23 13:55:31 +00:00
Francois-Xavier Le Bail
d4fe5e32fd TCP: Add a test with data in the RST segment, truncated example 2021-01-19 18:25:15 +01:00
Francois-Xavier Le Bail
383670e8f3 TCP: Add a test with data in the RST segment 2021-01-18 14:06:26 +01:00
Francois-Xavier Le Bail
ab150a17ea Add tests for more code coverage in timestamp printing functions
Use a TCP 3-Way Handshake test, nano precision.

Display micro outputs and nano outputs (with -q).
2021-01-05 17:19:23 +01:00
Francois-Xavier Le Bail
dd5c8e6776 Remove '-t' option for MACsec tests
like all the other tests.
2021-01-05 15:20:52 +01:00
Francois-Xavier Le Bail
192db0a116 SMB: Disable the printer by default
Like in 4.9.3 version.
This printer needs rework.

Move the tests with SMB packets in tests/smb.tests.
Add outputs files for the disabled case.
2020-12-19 12:16:50 +01:00
Denis Ovsienko
b402a7dc84 IGRP: Fix an OOBR introduced in the prev. change
Add missing GET_U_1() wrappers to cover struct igrprte properly again,
also deduplicate some code.

This fixes a buffer over-read introduced in a recent commit 09b9aad and
discovered by Hardik Shah.

Add a test using the capture file supplied by the reporter.
2020-12-05 23:43:17 +00:00
Guy Harris
92d636a906 dns: add some additional error checks.
If the upper 2 bits of a label/pointer value are 10, treat that as an
error.

If a name is longer than 255 characters, treat that as an error.

This prevents some long loops with malformed packets, as found by Hardik
Shah.
2020-11-14 20:34:25 -08:00
Francois-Xavier Le Bail
39fb6815e5 IPNET: Add a test case with '-e' option 2020-11-12 20:26:27 +01:00
Francois-Xavier Le Bail
3354431e89 PPTP: Add two tests
With and without '-v' option.

The capture file comes from the Wireshark menagerie (pptp.cap).
2020-10-31 11:46:12 +01:00
Davide Caratti
19b771391a mptcp: add support for ADD_ADDR "echo bit"
print "v1-echo" if the echo bit is set in the ADD_ADDR suboption (see
RFC8684 §3.4.1). While at it, dissect the 4 bits after the MPTCP option
subtype when the value is "ADD_ADDR" (0x3), according to protocol v0 and
v1. Add a selftest with a capture taken from a recent Linux kernel
implementation, and fix printout of add-addr in the existing selftests.

Signed-off-by: Davide Caratti <dcaratti@redhat.com>
2020-10-03 16:41:20 +01:00
Denis Ovsienko
bdac249ee0 OpenFlow 1.3: Add initial partial support.
This code processes only the simplest message types (9 out of the 30
defined).

Add a test from [1], which comes from [2], which comes from a
contributor in Ericsson (Zoltán Lajos Kis).

1: https://wiki.wireshark.org/SampleCaptures#OpenFlow
2: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9283
2020-09-28 13:58:12 +01:00
Bill Fenner
fab90c5c95 Update for messages and TLVs defined in RFC4388 2020-09-23 10:17:30 +00:00
Bill Fenner
f58e26a369 Update LSP ping: timestamps are NTP int+fraction
During development of LSP ping, the embedded timestamps were
changed from struct timeval to NTP time, so update the printer
to match the RFC.

(Cherry-picked from GH #874.)
2020-09-20 16:33:02 +01:00
Francois-Xavier Le Bail
09e8265641 Remove now unused 'tests/TESTonce'
Update a comment.
2020-09-06 21:36:33 +02:00
Herwin Weststrate
26f04f1f16 RADIUS: Add attributes from RFC5580. (GH #706) 2020-08-27 13:39:18 +01:00
Francois-Xavier Le Bail
4482e16802 SRv6: Add a test output without '-e'
This is a follow-up to commit 1103418a18.
2020-08-07 20:31:29 +02:00
Ahmed Abdelsalam
1103418a18 Add support for ethernet IP protocol
The SRv6 network programming defines a new IP protocol number [1].

The new protocol number is used in the Next Header field of an IPv6 header
or any extension header indicates that the payload is an Ethernet.

IANA has assigned 143 as the protocol number of ethernet [2].

The SRv6 packet has the following format:
IPv6 HDR + SRH + Ethernet HDR + IPv4/IPv6 packet

This patch allows TCPDUMP to dissect such SRv6 packets.

[1] https://tools.ietf.org/html/draft-ietf-spring-srv6-network-programming-16#section-9.1
[2] https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml

Signed-off-by: Ahmed Abdelsalam <ahabdels@gmail.com>
2020-08-07 16:11:20 +00:00
Francois-Xavier Le Bail
4a390644ce EAP: Add verbose output for the test case eapon1.pcap 2020-07-20 09:58:35 +02:00
Moses Devadason
1f9d3d622e LLDP 8021 link aggregation TLV support
As per IEEE std 802.1-AB-2009, 802.3 link aggregation TLV has been
deprecated and link aggregation TLV has been added as an 802.1
TLV. Support for this is given.
2020-06-30 20:12:31 +00:00
Francois-Xavier Le Bail
95e4db107c Add two test files for the unsupported link-layer protocols printer
This is a follow-up to commit 25687e1a31.

These files come from the Wireshark menagerie:
0031419.pcap (link type 160) and 5632-Raw_D-BUS.cap (first two packets).
2020-06-13 11:12:15 +02:00
Francois-Xavier Le Bail
403ae5774b DNS: Add two test files (over TCP and over UDP) 2020-06-10 11:50:32 +02:00
Guy Harris
7885cfa165
Merge branch 'master' into macsec 2020-05-27 17:01:23 -07:00
ckishimo
586e9b7720 IS-IS: Add LAN Adjacency Segment Identifier subTLV
Adapted from GitHub pull request #798.

Print " (invalid)" when combinations of V-Flag and L-Flag are invalid.

Update comments (draft -> RFC).

Remove some ND_TCHECK_LEN because GET_ use.

Update the output of isis_sid test because commit
b09710dfcd updated the output format
of the IS-IS dissector.
2020-05-25 16:43:42 +02:00
Guy Harris
dc5b398458 babel: update to include various later RFCs and I-Ds, including RFC 6126bis.
Adapted from GitHub pull request #768, with some cleanups and an
additional test update to handle the addition of the Unicast flag to the
Hello TLV.

Added a list of RFCs and I-Ds.
2020-05-24 01:13:32 -07:00
Eamon Doyle
341dc3fd91 Fix BGP Route Target Membership NLRI prefix decoding
As described in RFC4684, prefix lengths of 0 and
32-96 are all valid.  Introduce bgp_rt_prefix_print()
to print partial route targets.
2020-05-22 08:03:00 -07:00
Francois-Xavier Le Bail
ffe99539d7 Add test files for a previous fix
Fix was: "SLIP: Add some bounds checks"
(commit bbe15da782)

The pcap files were updated to avoid pcap_loop() error messages.
2020-04-30 10:53:18 +02:00
Francois-Xavier Le Bail
49cef1f2f4 Rename a pcapng test file to .pcapng 2020-04-25 11:09:00 +02:00
jacobgb24
6bb25b4b4c DNS: Update printing the EDNS options and their data with -vv
(pull request #808)

Format of EDNS options matches format of TCP options.
2020-04-10 13:17:44 +02:00
Casey Deccio
27bf32ee31 DNS: Add printing the EDNS options
(pull request #762)
2020-04-10 13:17:35 +02:00
Hannes Gredler
b09710dfcd IS-IS: Add support for Node/Prefix SIDs as per rfc 8667
(pull request #845)
2020-04-07 10:42:19 +02:00
Hannes Gredler
a193f168bf add support for Broadcom LI header
(pull request #843)

fix build break for Broadcom LI printer on BSD platforms

incorporate review comments: make bcm_li_print() void, add a sample capture

incorporate review comments: remove trailing tabs

add BCM LI outputs to testset

incorporate review comment: return after printing

update verbose output for bcm-li
2020-04-02 18:44:26 +02:00
Francois-Xavier Le Bail
6a66f11096 IPv4/IPv6 demux: Rename a printer
Rename ip_print_demux() to ip_demux_print(), with _print suffix like
in most similar cases.

Moreover:
Rename a test.
2020-03-08 14:07:37 +01:00
Francois-Xavier Le Bail
9736efeb96 Add "domain" as an option for -T
This allows tcpdump to handle DNS running on non-standard ports.

Add two test files with DNS over TCP and DNS over UDP, port 8053.
2020-03-02 20:53:23 +01:00
Peter Krystad
fdd065fb0f MPTCP: parse v1 ADD_ADDR option
RFC6824bis-18 (MPTCP version 1) makes changes to the MPTCP
ADD_ADDR option format.

An HMAC field is added to the option and the IP version field is
removed and replaced with an Echo bit that provides a reliability
mechanism.

This change allows either v0 or v1 ADD_ADDR options
to be parsed and displayed correctly.

Signed-off-by: Peter Krystad <peter.krystad@linux.intel.com>
2020-03-02 11:26:30 +01:00
Jeff Chan
8380f5ff00 Dispatch the PTP ethertype to ptp_print()
This implements "IEEE 802.3/Ethernet" mode as described in annex F of
the PTP standard. This uses the same format packets, but directly over
Ethernet instead of encapsulated in UDP.
2020-02-29 19:01:20 +01:00
Davide Caratti
4738c1fa73 MPTCP: parse MP_CAPABLE v1 options
A new version of MPTCP protocol (RFC8684) has been published, with some
changes to the MP_CAPABLE options handling. Let tcpdump print the protocol
version, and adjust parsing of MP_CAPABLE options according to RFC8684.

Signed-off-by: Davide Caratti <dcaratti@redhat.com>
2020-02-28 14:34:47 +01:00
fxlb
a022ed3a9d
Merge pull request #829 from fenner/isis-rfc8202
Parse the IS-IS Instance Identifier TLV from RFC8202
2020-02-24 10:55:27 +01:00
Manoharan Sundaramoorthy
4157af94f2 Parse the IS-IS Instance Identifier TLV from RFC8202 2020-02-21 04:45:24 -08:00
Guy Harris
344e610236 Add newline to the end of the last line. 2020-02-19 02:52:05 -08:00
Francesco Fondelli
246ca110d1 Autosar SOME/IP protocol support 2020-02-19 10:05:32 +01:00
simonov-d
5bf990afe2 Print MPLS-over-UDP. 2020-02-09 00:51:39 +05:00
Francois-Xavier Le Bail
521ac1db3f LDP: Add some missing bounds checks
Replace calls to ipaddr_string()/ip6addr_string() with calls to
GET_IPADDR_STRING()/GET_IP6ADDR_STRING() macros performing bounds
checking.

Fix a regression in 78a4ee8222.

This fixes a buffer over-read in ldp_tlv_print() discovered by
Jason Xiaole.

Add a test using the capture file supplied by the reporter updated
to keep only the packet showing the buffer over-read.
2020-01-18 19:30:38 +01:00
Partha Ghosh
6f53130273 The ptp (precision time protocol) with UDP as the transport protocol.
- the print routines for ptp different ptp messages
- test completed for sync message, announce message, delay request message,
  delay response message and follow up message.
- integration of the ptp v2 code with the tcpdump code.

Signed-off-by: Partha S. Ghosh <psglinux@gmail.com>
2019-11-22 20:56:21 +01:00