]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Use ConfValIs* for parsing pf-ring.checksum-checks.
authormaxtors <moe.andreas@gmail.com>
Thu, 5 May 2016 08:58:24 +0000 (10:58 +0200)
committermaxtors <moe.andreas@gmail.com>
Thu, 5 May 2016 08:58:24 +0000 (10:58 +0200)
src/runmode-pfring.c

index ca37649c7c0ccf60be795bab2de2dce9299f0f3c..f7aa410a5dace223b3a0e033d7ff58eb92114e95 100644 (file)
@@ -354,9 +354,9 @@ void *ParsePfringConfig(const char *iface)
     if (ConfGetChildValueWithDefault(if_root, if_default, "checksum-checks", &tmpctype) == 1) {
         if (strcmp(tmpctype, "auto") == 0) {
             pfconf->checksum_mode = CHECKSUM_VALIDATION_AUTO;
-        } else if (strcmp(tmpctype, "yes") == 0) {
+        } else if (ConfValIsTrue(tmpctype)) {
             pfconf->checksum_mode = CHECKSUM_VALIDATION_ENABLE;
-        } else if (strcmp(tmpctype, "no") == 0) {
+        } else if (ConfValIsFalse(tmpctype)) {
             pfconf->checksum_mode = CHECKSUM_VALIDATION_DISABLE;
         } else if (strcmp(tmpctype, "rx-only") == 0) {
             pfconf->checksum_mode = CHECKSUM_VALIDATION_RXONLY;