From: maxtors Date: Thu, 5 May 2016 08:53:41 +0000 (+0200) Subject: Use ConfValIs* for parsing pcap.checksum-checks. X-Git-Tag: suricata-3.1RC1~198 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70b864d06b7b35958adda92c2ad2725cb11dbbcd;p=thirdparty%2Fsuricata.git Use ConfValIs* for parsing pcap.checksum-checks. --- diff --git a/src/runmode-pcap.c b/src/runmode-pcap.c index 52eff0f9bf..a08150109f 100644 --- a/src/runmode-pcap.c +++ b/src/runmode-pcap.c @@ -191,9 +191,9 @@ void *ParsePcapConfig(const char *iface) if (ConfGetChildValueWithDefault(if_root, if_default, "checksum-checks", &tmpctype) == 1) { if (strcmp(tmpctype, "auto") == 0) { aconf->checksum_mode = CHECKSUM_VALIDATION_AUTO; - } else if (strcmp(tmpctype, "yes") == 0) { + } else if (ConfValIsTrue(tmpctype)) { aconf->checksum_mode = CHECKSUM_VALIDATION_ENABLE; - } else if (strcmp(tmpctype, "no") == 0) { + } else if (ConfValIsFalse(tmpctype)) { aconf->checksum_mode = CHECKSUM_VALIDATION_DISABLE; } else { SCLogError(SC_ERR_INVALID_ARGUMENT, "Invalid value for checksum-checks for %s", aconf->iface);