aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2023-06-15 12:01:11 +0200
committerGitHub <noreply@github.com>2023-06-15 12:01:11 +0200
commit2321c11eb56211733050429bbeb0a89ddc0caed0 (patch)
tree4fcd91924777e4bac28c11a0d6ba785bd2e0606a
parentd0609ea601f6e0e9fac7cfe622d07e41f0129e89 (diff)
Fix compilation (#2011)
-rw-r--r--src/include/ndpi_typedefs.h4
-rw-r--r--src/lib/ndpi_main.c8
2 files changed, 5 insertions, 7 deletions
diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h
index a64601f3d..898d305fc 100644
--- a/src/include/ndpi_typedefs.h
+++ b/src/include/ndpi_typedefs.h
@@ -1675,8 +1675,8 @@ struct ndpi_flow_struct {
_Static_assert(sizeof(((struct ndpi_flow_struct *)0)->protos) <= 210,
"Size of the struct member protocols increased to more than 210 bytes, "
"please check if this change is necessary.");
-_Static_assert(sizeof(struct ndpi_flow_struct) <= 944,
- "Size of the flow struct increased to more than 944 bytes, "
+_Static_assert(sizeof(struct ndpi_flow_struct) <= 952,
+ "Size of the flow struct increased to more than 952 bytes, "
"please check if this change is necessary.");
#endif
#endif
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index b338839c8..39673ca48 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -6160,11 +6160,9 @@ static void ndpi_reconcile_protocols(struct ndpi_detection_module_struct *ndpi_s
}
if(ret->app_protocol == NDPI_PROTOCOL_SKYPE_TEAMS_CALL) {
- struct ndpi_packet_struct *packet = &ndpi_str->packet;
-
- if((packet != NULL) && (packet->udp != NULL)) {
- u_int16_t sport = ntohs(packet->udp->source);
- u_int16_t dport = ntohs(packet->udp->dest);
+ if(flow->l4_proto == IPPROTO_UDP) {
+ u_int16_t sport = ntohs(flow->c_port);
+ u_int16_t dport = ntohs(flow->s_port);
/*
https://extremeportal.force.com/ExtrArticleDetail?an=000101782