From 18de4c9654aff7d48904511946d34964f74caab7 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 13 Jun 2016 13:32:28 +0200 Subject: [PATCH] offloading: work around missing TOE support --- src/util-ioctl.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/util-ioctl.c b/src/util-ioctl.c index 866e6a0f61..cfca00b3a4 100644 --- a/src/util-ioctl.c +++ b/src/util-ioctl.c @@ -363,6 +363,7 @@ static int GetIfaceOffloadingBSD(const char *ifname) "problems. Run: ifconfig %s -rxcsum", ifname, ifname); ret = 1; } +#ifdef IFCAP_TOE if (if_caps & (IFCAP_TSO|IFCAP_TOE|IFCAP_LRO)) { SCLogWarning(SC_ERR_NIC_OFFLOADING, "Using %s with TSO, TOE or LRO activated can lead to " @@ -370,6 +371,15 @@ static int GetIfaceOffloadingBSD(const char *ifname) ifname, ifname); ret = 1; } +#else + if (if_caps & (IFCAP_TSO|IFCAP_LRO)) { + SCLogWarning(SC_ERR_NIC_OFFLOADING, + "Using %s with TSO or LRO activated can lead to " + "capture problems. Run: ifconfig %s -tso -lro", + ifname, ifname); + ret = 1; + } +#endif return ret; } #endif