GNOME Bugzilla – Bug 751879
pcapparse: Fix parsing of packets with eth padding
Last modified: 2015-08-16 13:37:07 UTC
Created attachment 306684 [details] [review]
Patch with fix and test
Attached patch fixes regression from 1.4 when handling packets with eth padding.
The patch also adds a test suite for pcapparse with a test for this issue.
Oh, I have some pcap regression fixes too which I forgot to push it seems, let me check if it's the same.
Thanks, pushed mine since I thought it's clearer, and also there was a gratuitous log message addition in your patch, hope you don't mind too much :) Added the unit test though, thanks!
Author: Stian Selnes <email@example.com>
Date: Thu Jul 2 13:45:04 2015 +0200
tests: pcapparse: add unit test for frames with eth padding
Author: Tim-Philipp Müller <firstname.lastname@example.org>
Date: Mon Jun 15 12:55:39 2015 +0100
pcapparse: fix regression when handling packets with eth padding
Introduced by c4c9fe60b pcapparse: Take buffer directly from the adapter
Flush any trailing bytes after the payload from the adapter as well,
otherwise we'll read a bogus packet size from the adapter next and
then everything goes downhill from there.