diff options
author | Luca Deri <deri@ntop.org> | 2020-09-24 23:26:03 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2020-09-24 23:26:03 +0200 |
commit | 044ed14b4f23708ec05f5b5c85ca29acbf4b59db (patch) | |
tree | a03aea7d48eb8ec6b5d83da71c7ab2c40fcbc10c /src/lib/protocols/radius.c | |
parent | 51e86346d31f270099d4169cd2ebcb0146e5e593 (diff) |
Various optimizations to reduce not-necessary calls
Optimized various UDP dissectors
Removed dead protocols such as pando and pplive
Diffstat (limited to 'src/lib/protocols/radius.c')
-rw-r--r-- | src/lib/protocols/radius.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/protocols/radius.c b/src/lib/protocols/radius.c index 5597f64a2..4e2782d9c 100644 --- a/src/lib/protocols/radius.c +++ b/src/lib/protocols/radius.c @@ -40,9 +40,11 @@ static void ndpi_check_radius(struct ndpi_detection_module_struct *ndpi_struct, if(packet->udp != NULL) { struct radius_header *h = (struct radius_header*)packet->payload; /* RFC2865: The minimum length is 20 and maximum length is 4096. */ - if((payload_len < 20) || (payload_len > 4096)) - return; - + if((payload_len < 20) || (payload_len > 4096)) { + NDPI_EXCLUDE_PROTO(ndpi_struct, flow); + return; + } + if((h->code > 0) && (h->code <= 13) && (ntohs(h->len) == payload_len)) { |