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! commit 158f8d5b68795e807c3bc5ede2be0b976762e274 Author: Stian Selnes <stian@pexip.com> Date: Thu Jul 2 13:45:04 2015 +0200 tests: pcapparse: add unit test for frames with eth padding https://bugzilla.gnome.org/show_bug.cgi?id=751879 commit aec19c10537124b1dbf1eb4cfa65ef68778fcd67 Author: Tim-Philipp Müller <tim@centricular.com> 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. https://bugzilla.gnome.org/show_bug.cgi?id=751879