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 785778 - pcapparse: support vlan 802.1q
pcapparse: support vlan 802.1q
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal enhancement
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-08-03 15:15 UTC by Aaron Boxer
Modified: 2017-08-09 06:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
pcapparse: support vlan 802.1q (1.92 KB, patch)
2017-08-03 15:17 UTC, Aaron Boxer
none Details | Review
pcapparse: support vlan 802.1q (2.03 KB, patch)
2017-08-04 11:53 UTC, Aaron Boxer
none Details | Review
pcapparse: support vlan 802.1q (2.19 KB, patch)
2017-08-04 12:18 UTC, Aaron Boxer
committed Details | Review

Description Aaron Boxer 2017-08-03 15:15:36 UTC
https://en.wikipedia.org/wiki/IEEE_802.1Q
Comment 1 Aaron Boxer 2017-08-03 15:17:07 UTC
Created attachment 356865 [details] [review]
pcapparse: support vlan 802.1q
Comment 2 Sebastian Dröge (slomo) 2017-08-04 06:03:30 UTC
Review of attachment 356865 [details] [review]:

::: gst/pcapparse/gstpcapparse.c
@@ +377,3 @@
+      if (eth_type == 0x8100) {
+        eth_type =
+            GUINT16_FROM_BE (*((guint16 *) (buf + ETH_MAC_ADDRESSES_LEN + 4)));

You should probably check if you actually have enough data for this
Comment 3 Aaron Boxer 2017-08-04 11:52:36 UTC
Test file:  

http://s3.amazonaws.com/fox_misc/aperi_tr01_1s_pkts-C.cap.gz

renamed to "test.cap"

Test pipeline:  

gst-launch-1.0 -v filesrc location=~/test.cap !  pcapparse ! fakesink silent=false
Comment 4 Aaron Boxer 2017-08-04 11:53:30 UTC
Created attachment 356937 [details] [review]
pcapparse: support vlan 802.1q

Added check that there is enough data for the extra 4 byte vlan header
Comment 5 Aaron Boxer 2017-08-04 12:18:02 UTC
Created attachment 356945 [details] [review]
pcapparse: support vlan 802.1q

small improvement (can't wait to switch to GitLab :) )
Comment 6 Sebastian Dröge (slomo) 2017-08-09 06:56:54 UTC
Attachment 356945 [details] pushed as 27c04cf - pcapparse: support vlan 802.1q