]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
af-packet: improve error handling for some hw
authorEric Leblond <eric@regit.org>
Wed, 5 Jun 2019 21:33:17 +0000 (23:33 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 18 Jun 2019 05:07:02 +0000 (07:07 +0200)
Some cards seems to return EAGAIN when there is no more place in
the hash table.

src/source-af-packet.c

index 496a2a4268e785c595086ddd9ab863a8507d4bae..1daa17bdd9a49ad14b254b05da407f2b440e26ae 100644 (file)
@@ -2315,6 +2315,9 @@ static int AFPInsertHalfFlow(int mapd, void *key, uint32_t hash,
             /* no more place in the hash */
             case E2BIG:
                 return 0;
+            /* no more place in the hash for some hardware bypass */
+            case EAGAIN:
+                return 0;
             /* if we already have the key then bypass is a success */
             case EEXIST:
                 return 1;