From: Victor Julien Date: Sat, 15 Dec 2018 14:20:39 +0000 (+0100) Subject: offloading: don't set multiple times per interface X-Git-Tag: suricata-4.1.2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa6b73d1c9f88d5ee534f5d85cb29d9426b78e20;p=thirdparty%2Fsuricata.git offloading: don't set multiple times per interface This could happen with netmap igb0->igb0^ IPS mode. --- diff --git a/src/util-ioctl.c b/src/util-ioctl.c index dbbda654f6..9141041d30 100644 --- a/src/util-ioctl.c +++ b/src/util-ioctl.c @@ -691,6 +691,9 @@ int GetIfaceOffloading(const char *dev, int csum, int other) int DisableIfaceOffloading(LiveDevice *dev, int csum, int other) { + /* already set */ + if (dev->offload_orig != 0) + return 0; #if defined HAVE_LINUX_ETHTOOL_H && defined SIOCETHTOOL return DisableIfaceOffloadingLinux(dev, csum, other); #elif defined SIOCSIFCAP