detect: Add support for sctp option in rule

'sctp' can now be used as a keyword in signature. It is at the same
level as the 'tcp' or 'udp' keywords.
remotes/origin/master-1.1.x
Eric Leblond 15 years ago committed by Victor Julien
parent 482991ad6d
commit a823160384

@ -116,6 +116,10 @@ int DetectProtoParse(DetectProto *dp, char *str)
proto = IPPROTO_ICMPV6;
dp->proto[proto / 8] |= 1 << (proto % 8);
SCLogDebug("ICMP protocol detected, sig applies both to ICMPv4 and ICMPv6");
} else if (strcasecmp(str, "sctp") == 0) {
proto = IPPROTO_SCTP;
dp->proto[proto / 8] |= 1 << (proto % 8);
SCLogDebug("SCTP protocol detected");
} else if (strcasecmp(str,"ip") == 0) {
/* Proto "ip" is treated as an "any" */
dp->flags |= DETECT_PROTO_ANY;

Loading…
Cancel
Save