diff --git a/src/app-layer.c b/src/app-layer.c index ad8e85a77382..1aa263816e66 100644 --- a/src/app-layer.c +++ b/src/app-layer.c @@ -573,7 +573,7 @@ static int TCPProtoDetect(ThreadVars *tv, TcpReassemblyThreadCtx *ra_ctx, *alproto = *alproto_otherdir; SCLogDebug("packet %" PRIu64 ": pd done(us %u them %u), parser called (r==%d), " - "APPLAYER_DETECT_PROTOCOL_ONLY_ONE_DIRECTION set", + "APPLAYER_DETECT_PROTOCOL_ONLY_ONE_DIRECTION set", p->pcap_cnt, *alproto, *alproto_otherdir, r); if (r < 0) { goto parser_error; diff --git a/src/detect-bytejump.h b/src/detect-bytejump.h index 6b6d425437cf..8f912bfb20b4 100644 --- a/src/detect-bytejump.h +++ b/src/detect-bytejump.h @@ -25,8 +25,8 @@ #define __DETECT_BYTEJUMP_H__ /** Bytejump Base */ -#define DETECT_BYTEJUMP_BASE_UNSET 0 /**< Unset type value string (automatic)*/ -#define DETECT_BYTEJUMP_BASE_OCT 8 /**< "oct" type value string */ +#define DETECT_BYTEJUMP_BASE_UNSET 0 /**< Unset type value string (automatic)*/ +#define DETECT_BYTEJUMP_BASE_OCT 8 /**< "oct" type value string */ #define DETECT_BYTEJUMP_BASE_DEC 10 /**< "dec" type value string */ #define DETECT_BYTEJUMP_BASE_HEX 16 /**< "hex" type value string */ diff --git a/src/detect-bytetest.h b/src/detect-bytetest.h index f202eff01639..1ee0999ecf8c 100644 --- a/src/detect-bytetest.h +++ b/src/detect-bytetest.h @@ -34,8 +34,8 @@ #define DETECT_BYTETEST_OP_LE 7 /**< less than equal operator */ /** Bytetest Base */ -#define DETECT_BYTETEST_BASE_UNSET 0 /**< Unset type value string (automatic)*/ -#define DETECT_BYTETEST_BASE_OCT 8 /**< "oct" type value string */ +#define DETECT_BYTETEST_BASE_UNSET 0 /**< Unset type value string (automatic)*/ +#define DETECT_BYTETEST_BASE_OCT 8 /**< "oct" type value string */ #define DETECT_BYTETEST_BASE_DEC 10 /**< "dec" type value string */ #define DETECT_BYTETEST_BASE_HEX 16 /**< "hex" type value string */ diff --git a/src/detect-engine-iponly.c b/src/detect-engine-iponly.c index 4eed8f052334..1fc6a8246f09 100644 --- a/src/detect-engine-iponly.c +++ b/src/detect-engine-iponly.c @@ -1610,9 +1610,9 @@ static int IPOnlyTestSig03(void) SigFree(de_ctx, s); /* pcre */ - s = SigInit( - de_ctx, "alert tcp any any -> any any (msg:\"SigTest40-03 sig is not IPOnly (pcre) \"; " - "pcre:\"/e?idps rule[sz]/i\"; classtype:misc-activity; sid:400001; rev:1;)"); + s = SigInit(de_ctx, + "alert tcp any any -> any any (msg:\"SigTest40-03 sig is not IPOnly (pcre) \"; " + "pcre:\"/e?idps rule[sz]/i\"; classtype:misc-activity; sid:400001; rev:1;)"); if (s == NULL) { goto end; } @@ -1647,9 +1647,9 @@ static int IPOnlyTestSig03(void) SigFree(de_ctx, s); /* flowbits */ - s = SigInit( - de_ctx, "alert tcp any any -> any any (msg:\"SigTest40-03 sig is not IPOnly (flowbits) " - "\"; flowbits:unset; classtype:misc-activity; sid:400001; rev:1;)"); + s = SigInit(de_ctx, + "alert tcp any any -> any any (msg:\"SigTest40-03 sig is not IPOnly (flowbits) " + "\"; flowbits:unset; classtype:misc-activity; sid:400001; rev:1;)"); if (s == NULL) { goto end; } diff --git a/src/detect-engine-sigorder.c b/src/detect-engine-sigorder.c index ab2e1307da44..970ad81579c8 100644 --- a/src/detect-engine-sigorder.c +++ b/src/detect-engine-sigorder.c @@ -862,25 +862,25 @@ static int SCSigOrderingTest02(void) DetectEngineCtx *de_ctx = DetectEngineCtxInit(); FAIL_IF(de_ctx == NULL); - sig = DetectEngineAppendSig( - de_ctx, "alert tcp any !21:902 -> any any (msg:\"Testing sigordering\"; " - "content:\"220\"; offset:0; depth:4; pcre:\"/220[- ]/\"; rev:4; sid:1;)"); + sig = DetectEngineAppendSig(de_ctx, + "alert tcp any !21:902 -> any any (msg:\"Testing sigordering\"; " + "content:\"220\"; offset:0; depth:4; pcre:\"/220[- ]/\"; rev:4; sid:1;)"); FAIL_IF_NULL(sig); - sig = DetectEngineAppendSig( - de_ctx, "drop tcp any !21:902 -> any any (msg:\"Testing sigordering\"; " - "content:\"220\"; offset:0; depth:4; pcre:\"/220[- ]/\"; rev:4; sid:2;)"); + sig = DetectEngineAppendSig(de_ctx, + "drop tcp any !21:902 -> any any (msg:\"Testing sigordering\"; " + "content:\"220\"; offset:0; depth:4; pcre:\"/220[- ]/\"; rev:4; sid:2;)"); FAIL_IF_NULL(sig); - sig = DetectEngineAppendSig( - de_ctx, "drop tcp any !21:902 -> any any (msg:\"Testing sigordering\"; " - "content:\"220\"; offset:10; depth:4; pcre:\"/220[- ]/\"; rev:4; sid:3;)"); + sig = DetectEngineAppendSig(de_ctx, + "drop tcp any !21:902 -> any any (msg:\"Testing sigordering\"; " + "content:\"220\"; offset:10; depth:4; pcre:\"/220[- ]/\"; rev:4; sid:3;)"); FAIL_IF_NULL(sig); - sig = DetectEngineAppendSig( - de_ctx, "pass tcp any !21:902 -> any any (msg:\"Testing sigordering\"; " - "content:\"220\"; offset:0; depth:4; pcre:\"/220[- ]/\"; " - "flowvar:http_host,\"www.oisf.net\"; rev:4; priority:1; sid:4;)"); + sig = DetectEngineAppendSig(de_ctx, + "pass tcp any !21:902 -> any any (msg:\"Testing sigordering\"; " + "content:\"220\"; offset:0; depth:4; pcre:\"/220[- ]/\"; " + "flowvar:http_host,\"www.oisf.net\"; rev:4; priority:1; sid:4;)"); FAIL_IF_NULL(sig); sig = DetectEngineAppendSig(de_ctx, @@ -888,10 +888,10 @@ static int SCSigOrderingTest02(void) "offset:0; depth:4; pcre:\"/220[- ]/\"; rev:4; priority:1; sid:5;)"); FAIL_IF_NULL(sig); - sig = DetectEngineAppendSig( - de_ctx, "pass tcp any !21:902 -> any any (msg:\"Testing sigordering\"; " - "pcre:\"/^User-Agent: (?P.*)\\r\\n/m\"; content:\"220\"; " - "offset:10; depth:4; rev:4; priority:3; sid:6;)"); + sig = DetectEngineAppendSig(de_ctx, + "pass tcp any !21:902 -> any any (msg:\"Testing sigordering\"; " + "pcre:\"/^User-Agent: (?P.*)\\r\\n/m\"; content:\"220\"; " + "offset:10; depth:4; rev:4; priority:3; sid:6;)"); FAIL_IF_NULL(sig); sig = DetectEngineAppendSig(de_ctx, @@ -915,14 +915,14 @@ static int SCSigOrderingTest02(void) "offset:11; depth:4; pcre:\"/220[- ]/\"; rev:4; priority:3; sid:10;)"); FAIL_IF_NULL(sig); - sig = DetectEngineAppendSig( - de_ctx, "alert tcp any !21:902 -> any any (msg:\"Testing sigordering\"; " - "content:\"220\"; offset:11; depth:4; pcre:\"/220[- ]/\"; rev:4; sid:11;)"); + sig = DetectEngineAppendSig(de_ctx, + "alert tcp any !21:902 -> any any (msg:\"Testing sigordering\"; " + "content:\"220\"; offset:11; depth:4; pcre:\"/220[- ]/\"; rev:4; sid:11;)"); FAIL_IF_NULL(sig); - sig = DetectEngineAppendSig( - de_ctx, "alert tcp any !21:902 -> any any (msg:\"Testing sigordering\"; " - "content:\"220\"; offset:11; depth:4; pcre:\"/220[- ]/\"; rev:4; sid:12;)"); + sig = DetectEngineAppendSig(de_ctx, + "alert tcp any !21:902 -> any any (msg:\"Testing sigordering\"; " + "content:\"220\"; offset:11; depth:4; pcre:\"/220[- ]/\"; rev:4; sid:12;)"); FAIL_IF_NULL(sig); sig = DetectEngineAppendSig(de_ctx, @@ -931,10 +931,10 @@ static int SCSigOrderingTest02(void) "priority:2; flowbits:isnotset,TEST.two; sid:13;)"); FAIL_IF_NULL(sig); - sig = DetectEngineAppendSig( - de_ctx, "alert tcp any !21:902 -> any any (msg:\"Testing sigordering\"; " - "content:\"220\"; offset:12; depth:4; pcre:\"/220[- ]/\"; rev:4; priority:2; " - "flowbits:set,TEST.two; sid:14;)"); + sig = DetectEngineAppendSig(de_ctx, + "alert tcp any !21:902 -> any any (msg:\"Testing sigordering\"; " + "content:\"220\"; offset:12; depth:4; pcre:\"/220[- ]/\"; rev:4; priority:2; " + "flowbits:set,TEST.two; sid:14;)"); FAIL_IF_NULL(sig); SCSigRegisterSignatureOrderingFunc(de_ctx, SCSigOrderByActionCompare); diff --git a/src/detect-engine-state.c b/src/detect-engine-state.c index f7eb90a3318f..772d41e60b4a 100644 --- a/src/detect-engine-state.c +++ b/src/detect-engine-state.c @@ -586,10 +586,10 @@ static int DeStateSigTest02(void) de_ctx->flags |= DE_QUIET; - Signature *s = DetectEngineAppendSig( - de_ctx, "alert tcp any any -> any any (flow:to_server; content:\"POST\"; http_method; " - "content:\"/\"; http_uri; content:\"Mozilla\"; http_header; content:\"dummy\"; " - "http_cookie; content:\"body\"; nocase; http_client_body; sid:1; rev:1;)"); + Signature *s = DetectEngineAppendSig(de_ctx, + "alert tcp any any -> any any (flow:to_server; content:\"POST\"; http_method; " + "content:\"/\"; http_uri; content:\"Mozilla\"; http_header; content:\"dummy\"; " + "http_cookie; content:\"body\"; nocase; http_client_body; sid:1; rev:1;)"); FAIL_IF_NULL(s); s = DetectEngineAppendSig(de_ctx, "alert tcp any any -> any any (flow:to_server; content:\"GET\"; http_method; " @@ -689,9 +689,9 @@ static int DeStateSigTest03(void) de_ctx->flags |= DE_QUIET; - Signature *s = DetectEngineAppendSig( - de_ctx, "alert http any any -> any any (flow:to_server; content:\"POST\"; http_method; " - "content:\"upload.cgi\"; http_uri; filestore; sid:1; rev:1;)"); + Signature *s = DetectEngineAppendSig(de_ctx, + "alert http any any -> any any (flow:to_server; content:\"POST\"; http_method; " + "content:\"upload.cgi\"; http_uri; filestore; sid:1; rev:1;)"); FAIL_IF_NULL(s); SigGroupBuild(de_ctx); @@ -774,9 +774,9 @@ static int DeStateSigTest04(void) FAIL_IF_NULL(de_ctx); de_ctx->flags |= DE_QUIET; - Signature *s = DetectEngineAppendSig( - de_ctx, "alert http any any -> any any (content:\"GET\"; http_method; " - "content:\"upload.cgi\"; http_uri; filestore; sid:1; rev:1;)"); + Signature *s = DetectEngineAppendSig(de_ctx, + "alert http any any -> any any (content:\"GET\"; http_method; " + "content:\"upload.cgi\"; http_uri; filestore; sid:1; rev:1;)"); FAIL_IF_NULL(s); SigGroupBuild(de_ctx); @@ -857,9 +857,9 @@ static int DeStateSigTest05(void) FAIL_IF_NULL(de_ctx); de_ctx->flags |= DE_QUIET; - Signature *s = DetectEngineAppendSig( - de_ctx, "alert http any any -> any any (content:\"GET\"; http_method; " - "content:\"upload.cgi\"; http_uri; filename:\"nomatch\"; sid:1; rev:1;)"); + Signature *s = DetectEngineAppendSig(de_ctx, + "alert http any any -> any any (content:\"GET\"; http_method; " + "content:\"upload.cgi\"; http_uri; filename:\"nomatch\"; sid:1; rev:1;)"); FAIL_IF_NULL(s); SigGroupBuild(de_ctx); @@ -1030,9 +1030,9 @@ static int DeStateSigTest07(void) FAIL_IF_NULL(de_ctx); de_ctx->flags |= DE_QUIET; - Signature *s = DetectEngineAppendSig( - de_ctx, "alert http any any -> any any (content:\"GET\"; http_method; " - "content:\"upload.cgi\"; http_uri; filestore; sid:1; rev:1;)"); + Signature *s = DetectEngineAppendSig(de_ctx, + "alert http any any -> any any (content:\"GET\"; http_method; " + "content:\"upload.cgi\"; http_uri; filestore; sid:1; rev:1;)"); FAIL_IF_NULL(s); SigGroupBuild(de_ctx); diff --git a/src/detect-parse.c b/src/detect-parse.c index f2e6448c5067..9abb33a2c2da 100644 --- a/src/detect-parse.c +++ b/src/detect-parse.c @@ -3317,9 +3317,9 @@ static int SigParseTest18(void) if (de_ctx == NULL) goto end; - if (DetectEngineAppendSig(de_ctx, "alert tcp 1.2.3.4 any -> !1.2.3.4 any " - "(msg:\"SigParseTest01\"; sid:99999999999999999999;)") != - NULL) + if (DetectEngineAppendSig(de_ctx, + "alert tcp 1.2.3.4 any -> !1.2.3.4 any " + "(msg:\"SigParseTest01\"; sid:99999999999999999999;)") != NULL) goto end; result = 1; @@ -3338,9 +3338,9 @@ static int SigParseTest19(void) if (de_ctx == NULL) goto end; - if (DetectEngineAppendSig( - de_ctx, "alert tcp 1.2.3.4 any -> !1.2.3.4 any (msg:\"SigParseTest01\"; sid:1; " - "gid:99999999999999999999;)") != NULL) + if (DetectEngineAppendSig(de_ctx, + "alert tcp 1.2.3.4 any -> !1.2.3.4 any (msg:\"SigParseTest01\"; sid:1; " + "gid:99999999999999999999;)") != NULL) goto end; result = 1; @@ -3359,9 +3359,9 @@ static int SigParseTest20(void) if (de_ctx == NULL) goto end; - if (DetectEngineAppendSig( - de_ctx, "alert tcp 1.2.3.4 any -> !1.2.3.4 any (msg:\"SigParseTest01\"; sid:1; " - "rev:99999999999999999999;)") != NULL) + if (DetectEngineAppendSig(de_ctx, + "alert tcp 1.2.3.4 any -> !1.2.3.4 any (msg:\"SigParseTest01\"; sid:1; " + "rev:99999999999999999999;)") != NULL) goto end; result = 1; diff --git a/src/respond-reject-libnet11.c b/src/respond-reject-libnet11.c index 84d3ebc88806..ba99f7aadc60 100644 --- a/src/respond-reject-libnet11.c +++ b/src/respond-reject-libnet11.c @@ -551,7 +551,7 @@ int RejectSendLibnet11IPv6ICMP(ThreadVars *tv, Packet *p, void *data, enum Rejec return 0; } -#else /* HAVE_LIBNET_ICMPV6_UNREACH */ +#else /* HAVE_LIBNET_ICMPV6_UNREACH */ int RejectSendLibnet11IPv6ICMP(ThreadVars *tv, Packet *p, void *data, enum RejectDirection dir) { diff --git a/src/source-nfq.c b/src/source-nfq.c index 3da083bade26..05cf545067f9 100644 --- a/src/source-nfq.c +++ b/src/source-nfq.c @@ -1115,7 +1115,7 @@ TmEcode NFQSetVerdict(Packet *p) } else { ret = nfq_set_verdict2(t->qh, p->nfq_v.id, verdict, p->nfq_v.mark, 0, NULL); } -#else /* fall back to old function */ +#else /* fall back to old function */ if (p->flags & PKT_STREAM_MODIFIED) { ret = nfq_set_verdict_mark(t->qh, p->nfq_v.id, verdict, htonl(p->nfq_v.mark), GET_PKT_LEN(p), GET_PKT_DATA(p)); @@ -1146,7 +1146,7 @@ TmEcode NFQSetVerdict(Packet *p) (p->nfq_v.mark & ~nfq_config.mask), 0, NULL); } -#else /* fall back to old function */ +#else /* fall back to old function */ if (p->flags & PKT_STREAM_MODIFIED) { ret = nfq_set_verdict_mark(t->qh, p->nfq_v.id, verdict, htonl((nfq_config.mark & nfq_config.mask) | diff --git a/src/stream-tcp.c b/src/stream-tcp.c index 00f4b03f939f..be78a6b311bc 100644 --- a/src/stream-tcp.c +++ b/src/stream-tcp.c @@ -5159,7 +5159,7 @@ static int StreamTcpPacketIsBadWindowUpdate(TcpSession *ssn, Packet *p) SCLogDebug("%" PRIu64 ", pkt_win %u, stream win %u", p->pcap_cnt, pkt_win, ostream->window); SCLogDebug("%" PRIu64 ", seq %u ack %u ostream->next_seq %u ostream->last_ack %u, " - "ostream->next_win %u, diff %u (%u)", + "ostream->next_win %u, diff %u (%u)", p->pcap_cnt, seq, ack, ostream->next_seq, ostream->last_ack, ostream->next_win, ostream->next_seq - ostream->last_ack, stream->next_seq - stream->last_ack); diff --git a/src/tests/detect-http-client-body.c b/src/tests/detect-http-client-body.c index f56ad3529db9..70a79943cd21 100644 --- a/src/tests/detect-http-client-body.c +++ b/src/tests/detect-http-client-body.c @@ -1856,18 +1856,18 @@ static int DetectHttpClientBodyTest14(void) de_ctx->flags |= DE_QUIET; - s = DetectEngineAppendSig( - de_ctx, "alert tcp any any -> any any (content:\"POST\"; http_method; " - "content:\"Mozilla\"; http_header; content:\"dummy\"; http_cookie; " - "content:\"one\"; http_client_body; sid:1; rev:1;)"); + s = DetectEngineAppendSig(de_ctx, + "alert tcp any any -> any any (content:\"POST\"; http_method; " + "content:\"Mozilla\"; http_header; content:\"dummy\"; http_cookie; " + "content:\"one\"; http_client_body; sid:1; rev:1;)"); if (s == NULL) { printf("sig parse failed: "); goto end; } - s = DetectEngineAppendSig( - de_ctx, "alert tcp any any -> any any (content:\"GET\"; http_method; " - "content:\"Firefox\"; http_header; content:\"dummy2\"; http_cookie; " - "content:\"two\"; http_client_body; sid:2; rev:1;)"); + s = DetectEngineAppendSig(de_ctx, + "alert tcp any any -> any any (content:\"GET\"; http_method; " + "content:\"Firefox\"; http_header; content:\"dummy2\"; http_cookie; " + "content:\"two\"; http_client_body; sid:2; rev:1;)"); if (s == NULL) { printf("sig2 parse failed: "); goto end; @@ -2059,18 +2059,18 @@ static int DetectHttpClientBodyTest15(void) de_ctx->flags |= DE_QUIET; - s = DetectEngineAppendSig( - de_ctx, "alert tcp any any -> any any (content:\"POST\"; http_method; " - "content:\"Mozilla\"; http_header; content:\"dummy\"; http_cookie; " - "content:\"one\"; http_client_body; sid:1; rev:1;)"); + s = DetectEngineAppendSig(de_ctx, + "alert tcp any any -> any any (content:\"POST\"; http_method; " + "content:\"Mozilla\"; http_header; content:\"dummy\"; http_cookie; " + "content:\"one\"; http_client_body; sid:1; rev:1;)"); if (s == NULL) { printf("sig parse failed: "); goto end; } - s = DetectEngineAppendSig( - de_ctx, "alert tcp any any -> any any (content:\"GET\"; http_method; " - "content:\"Firefox\"; http_header; content:\"dummy2\"; http_cookie; " - "content:\"two\"; http_client_body; sid:2; rev:1;)"); + s = DetectEngineAppendSig(de_ctx, + "alert tcp any any -> any any (content:\"GET\"; http_method; " + "content:\"Firefox\"; http_header; content:\"dummy2\"; http_cookie; " + "content:\"two\"; http_client_body; sid:2; rev:1;)"); if (s == NULL) { printf("sig2 parse failed: "); goto end; diff --git a/src/tests/detect-http2.c b/src/tests/detect-http2.c index 6476c1e9a2f9..d67ed3ea9685 100644 --- a/src/tests/detect-http2.c +++ b/src/tests/detect-http2.c @@ -123,9 +123,9 @@ static int DetectHTTP2settingsParseTest01(void) DetectEngineCtx *de_ctx = DetectEngineCtxInit(); FAIL_IF_NULL(de_ctx); - Signature *sig = DetectEngineAppendSig( - de_ctx, "alert http2 any any -> any any (http2.settings:SETTINGS_MAX_HEADER_LIST_SIZE " - ">1024; sid:1; rev:1;)"); + Signature *sig = DetectEngineAppendSig(de_ctx, + "alert http2 any any -> any any (http2.settings:SETTINGS_MAX_HEADER_LIST_SIZE " + ">1024; sid:1; rev:1;)"); FAIL_IF_NULL(sig); DetectEngineCtxFree(de_ctx); diff --git a/src/tests/detect.c b/src/tests/detect.c index 7ab23c65f6ea..47cc1f2ada1b 100644 --- a/src/tests/detect.c +++ b/src/tests/detect.c @@ -226,9 +226,9 @@ static int SigTest04(void) de_ctx->flags |= DE_QUIET; - de_ctx->sig_list = SigInit( - de_ctx, "alert tcp any any -> any any (msg:\"HTTP TEST\"; content:\"Host:\"; " - "offset:20; depth:25; content:\"Host:\"; distance:42; within:47; sid:1;)"); + de_ctx->sig_list = SigInit(de_ctx, + "alert tcp any any -> any any (msg:\"HTTP TEST\"; content:\"Host:\"; " + "offset:20; depth:25; content:\"Host:\"; distance:42; within:47; sid:1;)"); if (de_ctx->sig_list == NULL) { result = 0; goto end; @@ -276,9 +276,9 @@ static int SigTest05(void) de_ctx->flags |= DE_QUIET; - de_ctx->sig_list = SigInit( - de_ctx, "alert tcp any any -> any any (msg:\"HTTP TEST\"; content:\"Host:\"; " - "offset:20; depth:25; content:\"Host:\"; distance:48; within:52; sid:1;)"); + de_ctx->sig_list = SigInit(de_ctx, + "alert tcp any any -> any any (msg:\"HTTP TEST\"; content:\"Host:\"; " + "offset:20; depth:25; content:\"Host:\"; distance:48; within:52; sid:1;)"); if (de_ctx->sig_list == NULL) { printf("sig parse failed: "); goto end; @@ -503,9 +503,9 @@ static int SigTest08(void) de_ctx->flags |= DE_QUIET; - de_ctx->sig_list = SigInit( - de_ctx, "alert tcp any any -> any any (msg:\"HTTP URI cap\"; content:\"GET \"; " - "depth:4; pcre:\"/GET (?P.*) HTTP\\/1\\.0\\r\\n/G\"; sid:1;)"); + de_ctx->sig_list = SigInit(de_ctx, + "alert tcp any any -> any any (msg:\"HTTP URI cap\"; content:\"GET \"; " + "depth:4; pcre:\"/GET (?P.*) HTTP\\/1\\.0\\r\\n/G\"; sid:1;)"); if (de_ctx->sig_list == NULL) { result = 0; goto end; @@ -592,9 +592,9 @@ static int SigTest09(void) de_ctx->flags |= DE_QUIET; - de_ctx->sig_list = SigInit( - de_ctx, "alert tcp any any -> any any (msg:\"HTTP URI cap\"; content:\"GET \"; " - "depth:4; pcre:\"/GET (?P.*) HTTP\\/1\\.0\\r\\n/G\"; sid:1;)"); + de_ctx->sig_list = SigInit(de_ctx, + "alert tcp any any -> any any (msg:\"HTTP URI cap\"; content:\"GET \"; " + "depth:4; pcre:\"/GET (?P.*) HTTP\\/1\\.0\\r\\n/G\"; sid:1;)"); if (de_ctx->sig_list == NULL) { result = 0; goto end; @@ -812,9 +812,9 @@ static int SigTest12(void) de_ctx->flags |= DE_QUIET; - de_ctx->sig_list = SigInit( - de_ctx, "alert tcp any any -> any any (msg:\"Content order test\"; " - "content:\"ABCDEFGHIJ\"; content:\"klmnop\"; content:\"1234\"; sid:1;)"); + de_ctx->sig_list = SigInit(de_ctx, + "alert tcp any any -> any any (msg:\"Content order test\"; " + "content:\"ABCDEFGHIJ\"; content:\"klmnop\"; content:\"1234\"; sid:1;)"); if (de_ctx->sig_list == NULL) { result = 0; goto end; @@ -869,9 +869,9 @@ static int SigTest13(void) de_ctx->flags |= DE_QUIET; - de_ctx->sig_list = SigInit( - de_ctx, "alert tcp any any -> any any (msg:\"Content order test\"; " - "content:\"ABCDEFGHIJ\"; content:\"1234\"; content:\"klmnop\"; sid:1;)"); + de_ctx->sig_list = SigInit(de_ctx, + "alert tcp any any -> any any (msg:\"Content order test\"; " + "content:\"ABCDEFGHIJ\"; content:\"1234\"; content:\"klmnop\"; sid:1;)"); if (de_ctx->sig_list == NULL) { result = 0; goto end; @@ -3420,9 +3420,9 @@ static int SigTest36ContentAndIsdataatKeywords01(void) de_ctx->flags |= DE_QUIET; - de_ctx->sig_list = SigInit( - de_ctx, "alert tcp any any -> any any (msg:\"SigTest36ContentAndIsdataatKeywords01 \"; " - "content:\"HTTP\"; isdataat:404, relative; sid:101;)"); + de_ctx->sig_list = SigInit(de_ctx, + "alert tcp any any -> any any (msg:\"SigTest36ContentAndIsdataatKeywords01 \"; " + "content:\"HTTP\"; isdataat:404, relative; sid:101;)"); if (de_ctx->sig_list == NULL) { result = 0; goto end; @@ -3538,9 +3538,9 @@ static int SigTest37ContentAndIsdataatKeywords02(void) de_ctx->flags |= DE_QUIET; - Signature *s = de_ctx->sig_list = SigInit( - de_ctx, "alert tcp any any -> any any (msg:\"SigTest37ContentAndIsdataatKeywords01 \"; " - "content:\"HTTP\"; isdataat:500, relative; sid:101;)"); + Signature *s = de_ctx->sig_list = SigInit(de_ctx, + "alert tcp any any -> any any (msg:\"SigTest37ContentAndIsdataatKeywords01 \"; " + "content:\"HTTP\"; isdataat:500, relative; sid:101;)"); if (de_ctx->sig_list == NULL) { printf("sig parse failed: "); result = 0; @@ -4019,10 +4019,10 @@ static int SigTestContent04(void) de_ctx->flags |= DE_QUIET; - de_ctx->sig_list = SigInit( - de_ctx, "alert tcp any any -> any any (msg:\"Test 32\"; " - "content:\"01234567890123456789012345678901\"; " - "content:\"abcdefghijklmnopqrstuvwxyzABCDEF\"; distance:0; within:32; sid:1;)"); + de_ctx->sig_list = SigInit(de_ctx, + "alert tcp any any -> any any (msg:\"Test 32\"; " + "content:\"01234567890123456789012345678901\"; " + "content:\"abcdefghijklmnopqrstuvwxyzABCDEF\"; distance:0; within:32; sid:1;)"); if (de_ctx->sig_list == NULL) { result = 0; goto end; @@ -4069,18 +4069,18 @@ static int SigTestContent05(void) de_ctx->flags |= DE_QUIET; - de_ctx->sig_list = SigInit( - de_ctx, "alert tcp any any -> any any (msg:\"Test 32\"; " - "content:\"01234567890123456789012345678901\"; " - "content:\"abcdefghijklmnopqrstuvwxyzABCDEF\"; distance:0; within:32; sid:1;)"); + de_ctx->sig_list = SigInit(de_ctx, + "alert tcp any any -> any any (msg:\"Test 32\"; " + "content:\"01234567890123456789012345678901\"; " + "content:\"abcdefghijklmnopqrstuvwxyzABCDEF\"; distance:0; within:32; sid:1;)"); if (de_ctx->sig_list == NULL) { printf("sig1 parse failed: "); goto end; } - de_ctx->sig_list->next = SigInit( - de_ctx, "alert tcp any any -> any any (msg:\"Test 32\"; " - "content:\"01234567890123456789012345678901\"; " - "content:\"abcdefghijklmnopqrstuvwxyzABCDEF\"; distance:1; within:32; sid:2;)"); + de_ctx->sig_list->next = SigInit(de_ctx, + "alert tcp any any -> any any (msg:\"Test 32\"; " + "content:\"01234567890123456789012345678901\"; " + "content:\"abcdefghijklmnopqrstuvwxyzABCDEF\"; distance:1; within:32; sid:2;)"); if (de_ctx->sig_list->next == NULL) { printf("sig2 parse failed: "); goto end; @@ -4136,17 +4136,17 @@ static int SigTestContent06(void) de_ctx->flags |= DE_QUIET; - de_ctx->sig_list = SigInit( - de_ctx, "alert ip any any -> any any (msg:\"Test 32 sig1\"; " - "content:\"01234567890123456789012345678901\"; " - "content:\"abcdefghijklmnopqrstuvwxyzABCDEF\"; distance:0; within:32; sid:1;)"); + de_ctx->sig_list = SigInit(de_ctx, + "alert ip any any -> any any (msg:\"Test 32 sig1\"; " + "content:\"01234567890123456789012345678901\"; " + "content:\"abcdefghijklmnopqrstuvwxyzABCDEF\"; distance:0; within:32; sid:1;)"); if (de_ctx->sig_list == NULL) { result = 0; goto end; } - de_ctx->sig_list->next = SigInit( - de_ctx, "alert ip any any -> any any (msg:\"Test 32 sig2\"; " - "content:\"01234567890123456789012345678901\"; content:\"abcdefg\"; sid:2;)"); + de_ctx->sig_list->next = SigInit(de_ctx, + "alert ip any any -> any any (msg:\"Test 32 sig2\"; " + "content:\"01234567890123456789012345678901\"; content:\"abcdefg\"; sid:2;)"); if (de_ctx->sig_list->next == NULL) { result = 0; goto end; diff --git a/src/util-threshold-config.c b/src/util-threshold-config.c index b4b9d73674e8..ec9e3b12a179 100644 --- a/src/util-threshold-config.c +++ b/src/util-threshold-config.c @@ -2328,9 +2328,9 @@ static int SCThresholdConfTest21(void) DetectEngineCtx *de_ctx = DetectEngineCtxInit(); FAIL_IF_NULL(de_ctx); de_ctx->flags |= DE_QUIET; - Signature *s = DetectEngineAppendSig( - de_ctx, "alert tcp any any -> any any (msg:\"Threshold limit\"; content:\"abc\"; " - "threshold: type limit, track by_dst, count 5, seconds 60; sid:1000;)"); + Signature *s = DetectEngineAppendSig(de_ctx, + "alert tcp any any -> any any (msg:\"Threshold limit\"; content:\"abc\"; " + "threshold: type limit, track by_dst, count 5, seconds 60; sid:1000;)"); FAIL_IF_NULL(s); g_ut_threshold_fp = SCThresholdConfGenerateValidDummyFD20(); FAIL_IF_NULL(g_ut_threshold_fp);