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 738206 - pcapparse can't handle LINKTYPE_RAW
pcapparse can't handle LINKTYPE_RAW
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.4.3
Other Linux
: Normal normal
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-10-09 08:11 UTC by David Woodhouse
Modified: 2014-10-09 16:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add support for LINKTYPE_RAW (2.12 KB, patch)
2014-10-09 08:11 UTC, David Woodhouse
committed Details | Review

Description David Woodhouse 2014-10-09 08:11:15 UTC
Created attachment 288098 [details] [review]
Add support for LINKTYPE_RAW

I used tcpdump to capture some VPN traffic. pcapparse couldn't handle it because it doesn't understand LINKTYPE_RAW (101).

Strictly speaking, these numbers aren't DLT_*; they are LINKTYPE_* because libpcap translates from internal OS-specific DLT_ numbering to the portable LINKTYPE_ number space when writing files. The patch fixes that too.
Comment 1 Olivier Crête 2014-10-09 14:18:34 UTC
Review of attachment 288098 [details] [review]:

::: gst/pcapparse/gstpcapparse.c
@@ +380,3 @@
+
+      eth_type = 0x800; /* Ick. We're assuming Legacy IP but the code
+                           below is stuck in the 20th century too. */

IPv6 support is being added in bug #735991
Comment 2 David Woodhouse 2014-10-09 14:51:29 UTC
Ah, neat. Looks like my patch still applies and should still DTRT since the patch there doesn't actually use the eth_type to distinguish between IPv6 and Legacy IP; it uses the version field in the IP header. So as long as we set *either* 0x800 or 0x86dd we're fine.
Comment 3 Olivier Crête 2014-10-09 16:47:15 UTC
Committed:

commit 684d0418969820f165978355104400167515b5c4
Author: David Woodhouse <dwmw2@infradead.org>
Date:   Thu Oct 9 04:11:00 2014 -0400

    pcapparse: Add support for LINKTYPE_RAW
    
    Also, strictly speaking, these numbers aren't DLT_*; they are LINKTYPE_* bec
    libpcap translates from internal OS-specific DLT_ numbering to the portable
    LINKTYPE_ number space when writing files.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=738206