]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
offloading: work around missing TOE support
authorVictor Julien <victor@inliniac.net>
Mon, 13 Jun 2016 11:32:28 +0000 (13:32 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 20 Jun 2016 15:57:59 +0000 (17:57 +0200)
src/util-ioctl.c

index 866e6a0f61f04e123c81d58b702cef8b1c2b7f46..cfca00b3a4b205e153f83fddfbc4a61902efe471 100644 (file)
@@ -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