]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
mpm: use IPPROTO_TCP for readability
authorVictor Julien <victor@inliniac.net>
Sat, 19 Sep 2015 16:41:36 +0000 (18:41 +0200)
committerVictor Julien <victor@inliniac.net>
Sat, 19 Sep 2015 16:41:36 +0000 (18:41 +0200)
src/detect-engine-mpm.c

index b8a997ff6b30f44580f487a5d1176d011573dbac..62d6c1517a6ddea773c70bc7cf9944a9d4d15398 100644 (file)
@@ -84,7 +84,7 @@ int SignatureHasPacketContent(Signature *s)
         SCReturnInt(0);
     }
 
-    if (!(s->proto.proto[6 / 8] & 1 << (6 % 8))) {
+    if (!(s->proto.proto[IPPROTO_TCP / 8] & 1 << (IPPROTO_TCP % 8))) {
         SCReturnInt(1);
     }
 
@@ -118,7 +118,7 @@ int SignatureHasStreamContent(Signature *s)
         SCReturnInt(0);
     }
 
-    if (!(s->proto.proto[6 / 8] & 1 << (6 % 8))) {
+    if (!(s->proto.proto[IPPROTO_TCP / 8] & 1 << (IPPROTO_TCP % 8))) {
         SCReturnInt(0);
     }