Fixes bug introduced by https://github.com/ntop/nDPI/pull/1085
This commit is contained in:
@@ -780,9 +780,6 @@ static struct ndpi_flow_info *get_ndpi_flow_info(struct ndpi_workflow * workflow
|
|||||||
flow.src_ip = iph->saddr, flow.dst_ip = iph->daddr;
|
flow.src_ip = iph->saddr, flow.dst_ip = iph->daddr;
|
||||||
flow.src_port = htons(*sport), flow.dst_port = htons(*dport);
|
flow.src_port = htons(*sport), flow.dst_port = htons(*dport);
|
||||||
flow.hashval = hashval = flow.protocol + flow.src_ip + flow.dst_ip + flow.src_port + flow.dst_port;
|
flow.hashval = hashval = flow.protocol + flow.src_ip + flow.dst_ip + flow.src_port + flow.dst_port;
|
||||||
if (workflow->prefs.ignore_vlanid == 0) {
|
|
||||||
flow.hashval += flow.vlan_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
printf("hashval=%u [%u][%u][%u:%u][%u:%u]\n", hashval, flow.protocol, flow.vlan_id,
|
printf("hashval=%u [%u][%u][%u:%u][%u:%u]\n", hashval, flow.protocol, flow.vlan_id,
|
||||||
@@ -1320,6 +1317,9 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow,
|
|||||||
u_int8_t begin_or_end_tcp = 0;
|
u_int8_t begin_or_end_tcp = 0;
|
||||||
struct ndpi_proto nproto = NDPI_PROTOCOL_NULL;
|
struct ndpi_proto nproto = NDPI_PROTOCOL_NULL;
|
||||||
|
|
||||||
|
if(workflow->prefs.ignore_vlanid)
|
||||||
|
vlan_id = 0;
|
||||||
|
|
||||||
if(iph)
|
if(iph)
|
||||||
flow = get_ndpi_flow_info(workflow, IPVERSION, vlan_id,
|
flow = get_ndpi_flow_info(workflow, IPVERSION, vlan_id,
|
||||||
tunnel_type, iph, NULL,
|
tunnel_type, iph, NULL,
|
||||||
|
|||||||
Reference in New Issue
Block a user