| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
-vv does not give more printed data than -v for the NTP protocol.
The only differences were about UDP checksums in IPv4 encapsulation.
|
|
|
|
| |
-vvv does not give more printed data than -vv.
|
|
|
|
|
|
|
|
|
|
|
| |
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]
|
|
|
|
|
|
|
|
| |
This may avoid this error:
Dissector error: print_unknown_data() called with pointer past end of
packet
Add a test file showing the problem.
|
|
|
|
|
|
| |
This may avoid this error:
Dissector error: print_unknown_data() called with pointer past end of
packet
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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]
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This is from the OpenBSD tcpdump.
|
|
|
|
| |
It's 2 bytes long.
|
|
|
|
| |
Based on the way it's dissected in Wireshark.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Taken from the OpenBSD version of tcpdump.
|
|
|
|
|
| |
Have separate .out files for dissection of wccp_redirect_gre.pcap with,
and without, SMB dissection enabled in tcpdump.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Add a test capture for it - and for GRE keepalives.
Both this and the previous GRE keepalive changes are based on OpenBSD
code.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Update the output of a test accordingly.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
|
| |
|
|
|
|
|
| |
The nanosecond part of the correction field is 48 bits and the
sub-nanosecond part is 16 bits.
|
|
|
|
| |
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
|
|
|
|
|
|
|
| |
BGPsec is specified in RFC8205. It adds a path attribute to BGP update
messages and a capability to BGP open messages.
tests: add pcap for BGPsec test
|
|
|
|
|
|
|
| |
Don't use htons() when defining the constants because the flags
field is already eventually swapped by fetching with GET_BE_U_2().
Remove unused flags NI_SUPTYPE_FLAG_COMPRESS and NI_FQDN_FLAG_VALIDTTL.
Add a test file with various NI_NODEADDR_FLAG* flags.
|
|
|
|
|
|
|
|
|
|
|
| |
In icmp6_rrenum_print() function.
From:
router renumberingrouter renum: command
To:
router renumbering, command
Add a test file from the Wireshark menagerie (5691-icmpv6-RFC2894-RR.pcap).
|
| |
|
|
|
|
| |
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
|
|
|
|
|
|
| |
From 0x0707 (ETHERTYPE_GEONET_OLD) to 0x8947 (ETHERTYPE_GEONET).
(Use -e option to see the changes)
|
|
|
|
|
|
| |
'geonet_v0_and_calm_fast' for GeoNetworking version 0.
[skip ci]
|
|
|
|
|
| |
Add support for the Hard Reset notifications and the corresponding
N flag in Graceful Restart capability advertisement, per RFC8538.
|
|
|
|
|
| |
Add the BFD cease notification subcode assigned by IANA.
This value is an early assignment for an in-progress standard.
|
| |
|
|
|
|
|
| |
A bunch of DLT_JUNIPER_ values were not being handled in the "DLT_
specific parsing" switch statement; add (empty) cases for them.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See pull request GH#955.
Add a comment with the Timestamp packet diagram. Define
ARISTA_SUBTYPE_TIMESTAMP as a two-byte integer, same as it is on the
wire. Break the version field into three fields and add printing of
HwInfo. Lose an unused variable and a few named constants. When
carrying whole seconds over from nanoseconds, use a large enough type
for seconds and do not forget to correct nanoseconds afterwards. Print
all fields using tok2str() and DHCP-like format. Update the associated
tests.
|
|
|
|
|
|
|
|
| |
This pcap file contains 3 corner cases:
1. A packet with more data than the length provides for
2. A packet that has a shutdown message with zero data
3. A packet whose shutdown message length is longer than the remaining data
in the notification
|
| |
|
|
|
|
|
| |
Per https://www.iana.org/assignments/nvo3/nvo3.xhtml
Also add test for GCP
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Have nd_push_buffer() take a snapshot length, not a snapshot end, as
its last argument.
Replace nd_push_snapend() and nd_change_snapend() with nd_push_snaplen()
and nd_change_snaplen(), both of which take a pointer into the packet
buffer and snapshot length relative to that pointer as arguments. Have
those routines check the snapshot length to make sure it's not bigger
than the number of bytes in the packet past the pointer, and silently
ignore the requst if it is.
Using a length rather than a pointer avoids the possibility of the
calculation of the snapshot end overflowing and resulting in a snapshot
end *before* the point in the buffer.
Add a test for this, with a capture file containing an IPv6 packet with
an extremely large "jumbo" packet size.
Revert the "Make sure we don't set the snapend before the beginning of
the packet." changes, as they no longer apply with this change (which
also makes sure we don't set the snapend before the beginning of the
packet).
|
|
|
|
|
| |
These pcap(ng) files were not tcpdump test files but libpcap test files.
They are now in the libpcap tests directory.
|
|
|
|
| |
Update the output of three tests accordingly.
|
| |
|
|
|
|
|
|
|
| |
This reverts commit a02c2faeec982d233a32b6db4df20ce817dd1563.
That zeroed out bits in the non-reserved portion of the field; the
reserved portion was already zero.
|
|
|
|
|
|
|
|
|
|
| |
For some reason pcap fuzzers just *love* to fuzz the "link-layer type
plus other stuff" part of the pcap file header. That can produce a file
that has non-zero values in reserved fields, which means it can get
rejected well before being handed to anything for dissection.
Clear out one of the reserved parts of that field, as we'll be changing
libpcap to check for non-zero values and reporting an error.
|