Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protodetect probing mask32 7437 v3 #12403

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app-layer-detect-proto.c
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ static AppProto AppLayerProtoDetectPPGetProto(Flow *f, const uint8_t *buf, uint3
else if (pp_port_sp)
mask = pp_port_sp->alproto_mask;

if (alproto_masks[0] == mask) {
if ((alproto_masks[0] & mask) == mask) {
FLOW_SET_PP_DONE(f, dir);
SCLogDebug("%s, mask is now %08x, needed %08x, so done",
(dir == STREAM_TOSERVER) ? "toserver":"toclient",
Expand Down
2 changes: 1 addition & 1 deletion src/app-layer-smtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1699,7 +1699,7 @@ static AppProto SMTPServerProbingParser(
return ALPROTO_UNKNOWN;
}
AppProto r = ALPROTO_UNKNOWN;
if (f->todstbytecnt > 4 && f->alproto_ts == ALPROTO_UNKNOWN) {
if (f->todstbytecnt > 4 && (f->alproto_ts == ALPROTO_UNKNOWN || f->alproto_ts == ALPROTO_TLS)) {
// Only validates SMTP if client side is unknown
// despite having received bytes.
r = ALPROTO_SMTP;
Expand Down
Loading