Fix CI after nBPF integration (#1746)

Add one CI job testing nBPF
This commit is contained in:
Ivan Nardi
2022-09-21 16:49:51 +02:00
committed by GitHub
parent c960bb50f0
commit 03d217eae6
4 changed files with 53 additions and 8 deletions
+3 -3
View File
@@ -3627,7 +3627,7 @@ int ndpi_handle_rule(struct ndpi_detection_module_struct *ndpi_str, char *rule,
char *filter = &attr[5];
if(ndpi_str->num_nbpf_custom_proto >= MAX_NBPF_CUSTOM_PROTO) {
NDPI_LOG_ERR(ndpi_str, "nBPF: too many protocols");
NDPI_LOG_ERR(ndpi_str, "nBPF: too many protocols\n");
return(-4); /* Too many protocols */
}
@@ -3643,14 +3643,14 @@ int ndpi_handle_rule(struct ndpi_detection_module_struct *ndpi_str, char *rule,
if((ndpi_str->nbpf_custom_proto[ndpi_str->num_nbpf_custom_proto].tree =
nbpf_parse(filter, NULL)) == NULL) {
NDPI_LOG_ERR(ndpi_str, "nBPF invalid filter: %s", filter)
NDPI_LOG_ERR(ndpi_str, "nBPF invalid filter: %s\n", filter)
return(-5); /* Invalid filter */
} else
ndpi_str->nbpf_custom_proto[ndpi_str->num_nbpf_custom_proto].l7_protocol = subprotocol_id;
ndpi_str->num_nbpf_custom_proto++;
#else
NDPI_LOG_ERR(ndpi_str, "nDPI compiled without nBPF support: skipping rule");
NDPI_LOG_INFO(ndpi_str, "nDPI compiled without nBPF support: skipping rule\n");
return(-6);
#endif
}