Disable printing dreaded app layer error messages to the screen: app layer events are here to safe us.

remotes/origin/master-1.2.x
Victor Julien 14 years ago
parent 132d9d1789
commit f773942ce0

@ -852,7 +852,7 @@ int AppLayerParse(void *local_data, Flow *f, uint8_t proto,
/* Do this check before calling AppLayerParse */ /* Do this check before calling AppLayerParse */
if (flags & STREAM_GAP) { if (flags & STREAM_GAP) {
SCLogDebug("stream gap detected (missing packets), this is not yet supported."); SCLogDebug("stream gap detected (missing packets), this is not yet supported.");
goto gap; goto error;
} }
/* Get the parser state (if any) */ /* Get the parser state (if any) */
@ -965,6 +965,7 @@ int AppLayerParse(void *local_data, Flow *f, uint8_t proto,
error: error:
if (ssn != NULL) { if (ssn != NULL) {
#ifdef DEBUG
if (FLOW_IS_IPV4(f)) { if (FLOW_IS_IPV4(f)) {
char src[16]; char src[16];
char dst[16]; char dst[16];
@ -973,8 +974,7 @@ error:
PrintInet(AF_INET, (const void*)&f->dst.addr_data32[0], dst, PrintInet(AF_INET, (const void*)&f->dst.addr_data32[0], dst,
sizeof (dst)); sizeof (dst));
SCLogError(SC_ERR_ALPARSER, "Error occured in parsing " SCLogDebug("Error occured in parsing \"%s\" app layer "
"\"%s\" app layer "
"protocol, using network protocol %"PRIu8", source IP " "protocol, using network protocol %"PRIu8", source IP "
"address %s, destination IP address %s, src port %"PRIu16" and " "address %s, destination IP address %s, src port %"PRIu16" and "
"dst port %"PRIu16"", al_proto_table[f->alproto].name, "dst port %"PRIu16"", al_proto_table[f->alproto].name,
@ -989,19 +989,13 @@ error:
PrintInet(AF_INET6, (const void*)&f->dst.addr_data32, dst6, PrintInet(AF_INET6, (const void*)&f->dst.addr_data32, dst6,
sizeof (dst6)); sizeof (dst6));
SCLogError(SC_ERR_ALPARSER, "Error occured in parsing " SCLogDebug("Error occured in parsing \"%s\" app layer "
"\"%s\" app layer "
"protocol, using network protocol %"PRIu8", source IPv6 " "protocol, using network protocol %"PRIu8", source IPv6 "
"address %s, destination IPv6 address %s, src port %"PRIu16" and " "address %s, destination IPv6 address %s, src port %"PRIu16" and "
"dst port %"PRIu16"", al_proto_table[f->alproto].name, "dst port %"PRIu16"", al_proto_table[f->alproto].name,
f->proto, src6, dst6, f->sp, f->dp); f->proto, src6, dst6, f->sp, f->dp);
fflush(stdout); fflush(stdout);
} }
}
gap:
if (ssn != NULL) {
#ifdef DEBUG
applayererrors++; applayererrors++;
if (f->alproto == ALPROTO_HTTP) if (f->alproto == ALPROTO_HTTP)
applayerhttperrors++; applayerhttperrors++;

Loading…
Cancel
Save