From: Victor Julien Date: Mon, 20 Jun 2016 21:02:02 +0000 (+0200) Subject: af-packet: optionally disable offloading X-Git-Tag: suricata-3.2beta1~315 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d48720f9a2590ce2d51d37433358bfda21c8579;p=thirdparty%2Fsuricata.git af-packet: optionally disable offloading --- diff --git a/src/runmode-af-packet.c b/src/runmode-af-packet.c index 0de06c12b9..65ba213b3b 100644 --- a/src/runmode-af-packet.c +++ b/src/runmode-af-packet.c @@ -453,10 +453,15 @@ finalize: switch (ltype) { case LINKTYPE_ETHERNET: /* af-packet can handle csum offloading */ - if (GetIfaceOffloading(iface, 0, 1) == 1) { - SCLogWarning(SC_ERR_AFP_CREATE, - "Using AF_PACKET with offloading activated leads to capture problems"); + if (LiveGetOffload() == 0) { + if (GetIfaceOffloading(iface, 0, 1) == 1) { + SCLogWarning(SC_ERR_AFP_CREATE, + "Using AF_PACKET with offloading activated leads to capture problems"); + } + } else { + DisableIfaceOffloading(iface, 0, 1); } + break; case -1: default: break;