Modified logic and test pcap file included.

Signed-off-by: Ravi Kerur <ravi.kerur@viasat.com>
This commit is contained in:
Ravi Kerur
2019-09-25 16:21:22 -07:00
parent c3a5650071
commit 4170eb3a1d
3 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -1124,7 +1124,7 @@ static void ndpi_init_protocol_defaults(struct ndpi_detection_module_struct *ndp
ndpi_set_proto_defaults(ndpi_mod, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_PS_VUE,
0 /* can_have_a_subprotocol */, no_master,
no_master, "PS_Vue", NDPI_PROTOCOL_CATEGORY_VIDEO,
no_master, "PS_VUE", NDPI_PROTOCOL_CATEGORY_VIDEO,
ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */);
ndpi_set_proto_defaults(ndpi_mod, NDPI_PROTOCOL_UNSAFE, NDPI_PROTOCOL_IRC,
+5 -3
View File
@@ -38,11 +38,13 @@ static u_int8_t is_ps_vue_flow(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_packet_struct *packet = &flow->packet;
if(packet->iph) {
struct in_addr daddr;
struct in_addr saddr, daddr;
saddr.s_addr = packet->iph->saddr;
daddr.s_addr = packet->iph->daddr;
if(ps_vue_ptree_match(ndpi_struct, &daddr)) {
if(ps_vue_ptree_match(ndpi_struct, &saddr) ||
ps_vue_ptree_match(ndpi_struct, &daddr)) {
return(1);
}
}
@@ -80,7 +82,7 @@ void ndpi_search_ps_vue(struct ndpi_detection_module_struct *ndpi_struct, struct
void init_ps_vue_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask)
{
ndpi_set_bitmask_protocol_detection("PS_Vue", ndpi_struct, detection_bitmask, *id,
ndpi_set_bitmask_protocol_detection("PS_VUE", ndpi_struct, detection_bitmask, *id,
NDPI_PROTOCOL_PS_VUE,
ndpi_search_ps_vue,
NDPI_SELECTION_BITMASK_PROTOCOL_TCP_OR_UDP_WITH_PAYLOAD,
Binary file not shown.