added double tagging 802.1Q in dissection of vlan pkt

This commit is contained in:
Campus
2017-02-21 13:04:17 +01:00
parent e68aeb69eb
commit c2c92b2e9b
+7 -1
View File
@@ -1,7 +1,7 @@
/*
* ndpi_util.c
*
* Copyright (C) 2011-16 - ntop.org
* Copyright (C) 2011-17 - ntop.org
*
* This file is part of nDPI, an open source deep packet inspection
* library based on the OpenDPI and PACE technology by ipoque GmbH
@@ -717,6 +717,12 @@ void ndpi_workflow_process_packet (struct ndpi_workflow * workflow,
type = (packet[ip_offset+2] << 8) + packet[ip_offset+3];
ip_offset += 4;
vlan_packet = 1;
// double tagging for 802.1Q
if(type == 0x8100) {
vlan_id = ((packet[ip_offset] << 8) + packet[ip_offset+1]) & 0xFFF;
type = (packet[ip_offset+2] << 8) + packet[ip_offset+3];
ip_offset += 4;
}
break;
case MPLS_UNI:
case MPLS_MULTI: