After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 751879 - pcapparse: Fix parsing of packets with eth padding
pcapparse: Fix parsing of packets with eth padding
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.5.2
Other Linux
: Normal normal
: 1.5.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-07-03 09:06 UTC by Stian Selnes (stianse)
Modified: 2015-08-16 13:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch with fix and test (4.99 KB, patch)
2015-07-03 09:06 UTC, Stian Selnes (stianse)
none Details | Review

Description Stian Selnes (stianse) 2015-07-03 09:06:16 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.
Comment 1 Tim-Philipp Müller 2015-07-03 09:18:22 UTC
Oh, I have some pcap regression fixes too which I forgot to push it seems, let me check if it's the same.
Comment 2 Tim-Philipp Müller 2015-07-03 09:45:32 UTC
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