]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
afpacket: only check offloading once per iface
authorVictor Julien <victor@inliniac.net>
Fri, 5 Dec 2014 09:17:15 +0000 (10:17 +0100)
committerVictor Julien <victor@inliniac.net>
Fri, 5 Dec 2014 09:17:15 +0000 (10:17 +0100)
Instead of once per thread per iface.

src/runmode-af-packet.c
src/source-af-packet.c

index 4c071f3529a796d7521214986aefab4b0aa42972..29817d22be30150abfb0f11e041711852618b269 100644 (file)
@@ -341,6 +341,11 @@ void *ParseAFPConfig(const char *iface)
         }
     }
 
+    if (GetIfaceOffloading(iface) == 1) {
+        SCLogWarning(SC_ERR_AFP_CREATE,
+                "Using AF_PACKET with GRO or LRO activated can lead to capture problems");
+    }
+
     return aconf;
 }
 
index 1d67f0a51e48aca4f9dc3f589017355061f52b88..174fcb0e9d4dd0854108b4e878f0b7f01989986a 100644 (file)
@@ -1502,11 +1502,6 @@ static int AFPCreateSocket(AFPThreadVars *ptv, char *devname, int verbose)
             goto socket_err;
         }
 
-        if (GetIfaceOffloading(devname) == 1) {
-            SCLogWarning(SC_ERR_AFP_CREATE,
-                         "Using mmap mode with GRO or LRO activated can lead to capture problems");
-        }
-
         /* Allocate RX ring */
 #define DEFAULT_ORDER 3
         for (order = DEFAULT_ORDER; order >= 0; order--) {