fclose(fp);
}
-static int RulesGroupByProto(DetectEngineCtx *de_ctx)
+static int RulesGroupByIPProto(DetectEngineCtx *de_ctx)
{
Signature *s = de_ctx->sig_list;
if (s->type == SIG_TYPE_IPONLY)
continue;
- int p;
- for (p = 0; p < 256; p++) {
+ /* traverse over IP protocol list from libc */
+ for (int p = 0; p < 256; p++) {
if (p == IPPROTO_TCP || p == IPPROTO_UDP) {
continue;
}
continue;
}
+ /* Signatures that are ICMP, SCTP, not IP only are handled here */
if (s->flags & SIG_FLAG_TOCLIENT) {
SigGroupHeadAppendSig(de_ctx, &sgh_tc[p], s);
}
de_ctx->flow_gh[0].udp = RulesGroupByPorts(de_ctx, IPPROTO_UDP, SIG_FLAG_TOCLIENT);
/* Setup the other IP Protocols (so not TCP/UDP) */
- RulesGroupByProto(de_ctx);
+ RulesGroupByIPProto(de_ctx);
/* now for every rule add the source group to our temp lists */
for (Signature *s = de_ctx->sig_list; s != NULL; s = s->next) {