Added check to avoid loops with invalid DHCP packets

This commit is contained in:
Luca Deri
2016-12-05 18:25:39 +01:00
parent 22ee439215
commit 163945f4b4
+2
View File
@@ -80,6 +80,8 @@ void ndpi_search_dhcp_udp(struct ndpi_detection_module_struct *ndpi_struct, stru
u_int8_t id = dhcp->options[i];
u_int8_t len = dhcp->options[i+1];
if(len == 0) break;
#ifdef DHCP_DEBUG
printf("[DHCP] Id=%d [len=%d]\n", id, len);
#endif