app-layer: make dns,smb,tls parsers less noisy w/o config

pull/4319/head
Victor Julien 7 years ago
parent 0526878fee
commit 4164c0bbd6

@ -131,16 +131,15 @@ void RegisterDNSTCPParsers(void)
sizeof(DNSHeader) + 2, RustDNSTCPProbe, RustDNSTCPProbe); sizeof(DNSHeader) + 2, RustDNSTCPProbe, RustDNSTCPProbe);
/* if we have no config, we enable the default port 53 */ /* if we have no config, we enable the default port 53 */
if (!have_cfg) { if (!have_cfg) {
SCLogWarning(SC_ERR_DNS_CONFIG, "no DNS TCP config found, " SCLogConfig("no DNS TCP config found, enabling DNS detection "
"enabling DNS detection on " "on port 53.");
"port 53.");
AppLayerProtoDetectPPRegister(IPPROTO_TCP, "53", ALPROTO_DNS, 0, AppLayerProtoDetectPPRegister(IPPROTO_TCP, "53", ALPROTO_DNS, 0,
sizeof(DNSHeader) + 2, STREAM_TOSERVER, RustDNSTCPProbe, sizeof(DNSHeader) + 2, STREAM_TOSERVER, RustDNSTCPProbe,
RustDNSTCPProbe); RustDNSTCPProbe);
} }
} }
} else { } else {
SCLogInfo("Protocol detection and parser disabled for %s protocol.", SCLogConfig("Protocol detection and parser disabled for %s protocol.",
proto_name); proto_name);
return; return;
} }
@ -175,7 +174,7 @@ void RegisterDNSTCPParsers(void)
APP_LAYER_PARSER_OPT_ACCEPT_GAPS); APP_LAYER_PARSER_OPT_ACCEPT_GAPS);
} else { } else {
SCLogInfo("Parsed disabled for %s protocol. Protocol detection" SCLogConfig("Parsed disabled for %s protocol. Protocol detection"
"still on.", proto_name); "still on.", proto_name);
} }

@ -139,7 +139,7 @@ void RegisterDNSUDPParsers(void)
/* If no config, enable on port 53. */ /* If no config, enable on port 53. */
if (!have_cfg) { if (!have_cfg) {
#ifndef AFLFUZZ_APPLAYER #ifndef AFLFUZZ_APPLAYER
SCLogWarning(SC_ERR_DNS_CONFIG, "no DNS UDP config found, " SCLogConfig("no DNS UDP config found, "
"enabling DNS detection on port 53."); "enabling DNS detection on port 53.");
#endif #endif
AppLayerProtoDetectPPRegister(IPPROTO_UDP, "53", ALPROTO_DNS, AppLayerProtoDetectPPRegister(IPPROTO_UDP, "53", ALPROTO_DNS,
@ -148,7 +148,7 @@ void RegisterDNSUDPParsers(void)
} }
} }
} else { } else {
SCLogInfo("Protocol detection and parser disabled for %s protocol.", SCLogConfig("Protocol detection and parser disabled for %s protocol.",
proto_name); proto_name);
return; return;
} }
@ -187,7 +187,7 @@ void RegisterDNSUDPParsers(void)
DNSUDPConfigure(); DNSUDPConfigure();
#endif #endif
} else { } else {
SCLogInfo("Parsed disabled for %s protocol. Protocol detection" SCLogConfig("Parsed disabled for %s protocol. Protocol detection"
"still on.", proto_name); "still on.", proto_name);
} }
#ifdef UNITTESTS #ifdef UNITTESTS

@ -280,16 +280,15 @@ void RegisterSMBParsers(void)
MIN_REC_SIZE, SMBTCPProbe, SMBTCPProbe); MIN_REC_SIZE, SMBTCPProbe, SMBTCPProbe);
/* if we have no config, we enable the default port 445 */ /* if we have no config, we enable the default port 445 */
if (!have_cfg) { if (!have_cfg) {
SCLogWarning(SC_ERR_SMB_CONFIG, "no SMB TCP config found, " SCLogConfig("no SMB TCP config found, enabling SMB detection "
"enabling SMB detection on " "on port 445.");
"port 445.");
AppLayerProtoDetectPPRegister(IPPROTO_TCP, "445", ALPROTO_SMB, 0, AppLayerProtoDetectPPRegister(IPPROTO_TCP, "445", ALPROTO_SMB, 0,
MIN_REC_SIZE, STREAM_TOSERVER, SMBTCPProbe, MIN_REC_SIZE, STREAM_TOSERVER, SMBTCPProbe,
SMBTCPProbe); SMBTCPProbe);
} }
} }
} else { } else {
SCLogInfo("Protocol detection and parser disabled for %s protocol.", SCLogConfig("Protocol detection and parser disabled for %s protocol.",
proto_name); proto_name);
return; return;
} }
@ -346,7 +345,7 @@ void RegisterSMBParsers(void)
AppLayerParserSetStreamDepth(IPPROTO_TCP, ALPROTO_SMB, stream_depth); AppLayerParserSetStreamDepth(IPPROTO_TCP, ALPROTO_SMB, stream_depth);
} else { } else {
SCLogInfo("Parsed disabled for %s protocol. Protocol detection" SCLogConfig("Parsed disabled for %s protocol. Protocol detection"
"still on.", proto_name); "still on.", proto_name);
} }
#ifdef UNITTESTS #ifdef UNITTESTS

@ -2865,8 +2865,7 @@ void RegisterSSLParsers(void)
proto_name, ALPROTO_TLS, proto_name, ALPROTO_TLS,
0, 3, 0, 3,
SSLProbingParser, NULL) == 0) { SSLProbingParser, NULL) == 0) {
SCLogWarning(SC_ERR_MISSING_CONFIG_PARAM, SCLogConfig("no TLS config found, "
"no TLS config found, "
"enabling TLS detection on port 443."); "enabling TLS detection on port 443.");
AppLayerProtoDetectPPRegister(IPPROTO_TCP, AppLayerProtoDetectPPRegister(IPPROTO_TCP,
"443", "443",
@ -2877,7 +2876,7 @@ void RegisterSSLParsers(void)
} }
} }
} else { } else {
SCLogInfo("Protocol detection and parser disabled for %s protocol", SCLogConfig("Protocol detection and parser disabled for %s protocol",
proto_name); proto_name);
return; return;
} }
@ -2970,7 +2969,7 @@ void RegisterSSLParsers(void)
#endif #endif
} else { } else {
SCLogInfo("Parsed disabled for %s protocol. Protocol detection" SCLogConfig("Parsed disabled for %s protocol. Protocol detection"
"still on.", proto_name); "still on.", proto_name);
} }

Loading…
Cancel
Save