Added check for removing characters from nDPI custom-defined protocols that might cause apps to misbehave.
This commit is contained in:
+1
-1
@@ -13,7 +13,7 @@ tcp:3000@ntop
|
|||||||
host:"googlesyndacation.com"@Google
|
host:"googlesyndacation.com"@Google
|
||||||
host:"venere.com"@Venere
|
host:"venere.com"@Venere
|
||||||
host:"kataweb.it",host:"repubblica.it"@Repubblica
|
host:"kataweb.it",host:"repubblica.it"@Repubblica
|
||||||
|
host:"ntop"@ntop
|
||||||
# IP based Subprotocols
|
# IP based Subprotocols
|
||||||
# Format:
|
# Format:
|
||||||
# ip:<value>,ip:<value>,.....@<subproto>
|
# ip:<value>,ip:<value>,.....@<subproto>
|
||||||
|
|||||||
@@ -2000,6 +2000,21 @@ int ndpi_handle_rule(struct ndpi_detection_module_struct *ndpi_mod, char* rule,
|
|||||||
} else
|
} else
|
||||||
at[0] = 0, proto = &at[1];
|
at[0] = 0, proto = &at[1];
|
||||||
|
|
||||||
|
for(i=0; proto[i] != '\0'; i++) {
|
||||||
|
switch(proto[i]) {
|
||||||
|
case '/':
|
||||||
|
case '&':
|
||||||
|
case '^':
|
||||||
|
case ':':
|
||||||
|
case ';':
|
||||||
|
case '\'':
|
||||||
|
case '"':
|
||||||
|
case ' ':
|
||||||
|
proto[i] = '_';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for(i=0, def = NULL; i<(int)ndpi_mod->ndpi_num_supported_protocols; i++) {
|
for(i=0, def = NULL; i<(int)ndpi_mod->ndpi_num_supported_protocols; i++) {
|
||||||
if(strcasecmp(ndpi_mod->proto_defaults[i].protoName, proto) == 0) {
|
if(strcasecmp(ndpi_mod->proto_defaults[i].protoName, proto) == 0) {
|
||||||
def = &ndpi_mod->proto_defaults[i];
|
def = &ndpi_mod->proto_defaults[i];
|
||||||
|
|||||||
Reference in New Issue
Block a user