From: Victor Julien Date: Mon, 20 Jun 2016 18:18:43 +0000 (+0200) Subject: pcap: optionally disable offloading X-Git-Tag: suricata-3.2beta1~317 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bc370606fc031743d42455b0be28547138ee2115;p=thirdparty%2Fsuricata.git pcap: optionally disable offloading --- diff --git a/src/source-pcap.c b/src/source-pcap.c index ac7d3a35a8..4385231b0b 100644 --- a/src/source-pcap.c +++ b/src/source-pcap.c @@ -395,6 +395,12 @@ TmEcode ReceivePcapThreadInit(ThreadVars *tv, void *initdata, void **data) SCLogInfo("using interface %s", (char *)pcapconfig->iface); + if (LiveGetOffload() == 0) { + (void)GetIfaceOffloading((char *)pcapconfig->iface, 1, 1); + } else { + DisableIfaceOffloading((char *)pcapconfig->iface, 1, 1); + } + ptv->checksum_mode = pcapconfig->checksum_mode; if (ptv->checksum_mode == CHECKSUM_VALIDATION_AUTO) { SCLogInfo("Running in 'auto' checksum mode. Detection of interface state will require "