]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
af-packet: fix reconnect code
authorEric Leblond <eric@regit.org>
Mon, 30 Jul 2012 10:11:23 +0000 (12:11 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 7 Aug 2012 07:58:42 +0000 (09:58 +0200)
Reconnect code was in a "work by luck" stage as we did not update
the socket number after reconnect.

src/source-af-packet.c

index c201876959cf076d651c3615171be483285d3c11..a671fd5346685beb50a1422a316d9c9eac89470b 100644 (file)
@@ -533,6 +533,7 @@ TmEcode ReceiveAFPLoop(ThreadVars *tv, void *data, void *slot)
                     break;
                 }
                 r = AFPTryReopen(ptv);
+                fds.fd = ptv->socket;
             } while (r < 0);
             if (dbreak == 1)
                 break;