Skip to content

Commit

Permalink
fixup clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
catenacyber committed Jan 18, 2024
1 parent e83e49b commit b3e065c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/detect-flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,13 +392,15 @@ int DetectFlowSetup (DetectEngineCtx *de_ctx, Signature *s, const char *flowstr)
/* set the signature direction flags */
if (fd->flags & DETECT_FLOW_FLAG_TOSERVER) {
if (s->init_data->init_flags & SIG_FLAG_INIT_BOTHDIR) {
SCLogError("rule %u means to use both directions, cannot specify a flow direction", s->id);
SCLogError(
"rule %u means to use both directions, cannot specify a flow direction", s->id);
return -1;
}
s->flags |= SIG_FLAG_TOSERVER;
} else if (fd->flags & DETECT_FLOW_FLAG_TOCLIENT) {
if (s->init_data->init_flags & SIG_FLAG_INIT_BOTHDIR) {
SCLogError("rule %u means to use both directions, cannot specify a flow direction", s->id);
SCLogError(
"rule %u means to use both directions, cannot specify a flow direction", s->id);
return -1;
}
s->flags |= SIG_FLAG_TOCLIENT;
Expand Down
4 changes: 3 additions & 1 deletion src/detect-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -2038,7 +2038,9 @@ static int SigValidate(DetectEngineCtx *de_ctx, Signature *s)
SCReturnInt(0);
}
if (dir_amb) {
SCLogError("rule %u means to use both directions, cannot have keywords ambiguous about directions", s->id);
SCLogError("rule %u means to use both directions, cannot have keywords ambiguous about "
"directions",
s->id);
SCReturnInt(0);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/detect.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ typedef struct DetectPort_ {
#define SIG_FLAG_INIT_BIDIREC BIT_U32(3) /**< signature has bidirectional operator */
#define SIG_FLAG_INIT_FIRST_IPPROTO_SEEN \
BIT_U32(4) /** < signature has seen the first ip_proto keyword */
#define SIG_FLAG_INIT_BOTHDIR BIT_U32(5) /**< signature needs both directions to match */
#define SIG_FLAG_INIT_BOTHDIR BIT_U32(5) /**< signature needs both directions to match */
#define SIG_FLAG_INIT_STATE_MATCH BIT_U32(6) /**< signature has matches that require stateful inspection */
#define SIG_FLAG_INIT_NEED_FLUSH BIT_U32(7)
#define SIG_FLAG_INIT_PRIO_EXPLICIT \
Expand Down

0 comments on commit b3e065c

Please sign in to comment.