diff options
author | Ravi Kerur <ravi.kerur@viasat.com> | 2019-09-25 16:21:22 -0700 |
---|---|---|
committer | Ravi Kerur <ravi.kerur@viasat.com> | 2019-09-25 16:21:22 -0700 |
commit | 4170eb3a1de350b100946239eaad7d4358d7ee1c (patch) | |
tree | 774663a84a4f703450f40d5f67afb504651dc58d /src | |
parent | c3a5650071b25a2f1eaf8606cd75d3eee28dc503 (diff) |
Modified logic and test pcap file included.
Signed-off-by: Ravi Kerur <ravi.kerur@viasat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/ndpi_main.c | 2 | ||||
-rw-r--r-- | src/lib/protocols/ps_vue.c | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 02f3574e5..79ca7b064 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -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, diff --git a/src/lib/protocols/ps_vue.c b/src/lib/protocols/ps_vue.c index ee91b5f84..a608c96c6 100644 --- a/src/lib/protocols/ps_vue.c +++ b/src/lib/protocols/ps_vue.c @@ -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, |