Commit Graph

4 Commits

Author SHA1 Message Date
Francois-Xavier Le Bail
018b2b8c96 Use UTC/GMT time when building/checking tests files
This will avoid some differences when checking in different time zones.

We now run the tests without the '-t' option. This will allow to get
problems/changes in time printing functions.

Update the output of the tests accordingly.

Moreover:
Add the '-#' option to better identify a packet when there is a difference
in output.
2018-08-09 09:23:07 +02:00
Francois-Xavier Le Bail
b4503d7c31 Add more nd_print_trunc() calls
Update the output of some tests accordingly.

Moreover:
Add a ndo_protocol assignment in pimv2_print().
2018-06-01 16:20:56 +02:00
Francois-Xavier Le Bail
f253e11009 Add a sanity check on packet header length
The packet length must be <= MAXIMUM_SNAPLEN.

Currently, there is no D-Bus printer, thus no need for a bigger length.

Now a pachet is valid if:
capture length != 0,
packet length != 0,
capture length <= MAXIMUM_SNAPLEN,
packet length <= MAXIMUM_SNAPLEN,
packet length >= capture length.

Moreover:
Fix the packet header lengths of some fuzzed pcap files:
If the lengths are > MAXIMUM_SNAPLEN, set them to MAXIMUM_SNAPLEN.
Thus they will be always usable with this new sanity check.
2018-02-07 18:48:49 +01:00
Guy Harris
ff3bcafccf PIM: Add another test.
Add a test using the capture file supplied by Bhargava Shastry, modified
so the capture file won't be rejected as an invalid capture.
2017-09-13 12:25:44 +01:00