pcap: handle failure of packet treatment

If the loop is breaked, this means we've got a treatment error. We
don't need to reconnect but we must exit with correct status.
pull/36/head
Eric Leblond 13 years ago
parent f82573be12
commit eaea832a4e

@ -287,6 +287,9 @@ TmEcode ReceivePcapLoop(ThreadVars *tv, void *data, void *slot)
int dbreak = 0;
SCLogError(SC_ERR_PCAP_DISPATCH, "error code %" PRId32 " %s",
r, pcap_geterr(ptv->pcap_handle));
if (r == PCAP_ERROR_BREAK) {
SCReturnInt(ptv->cb_result);
}
do {
usleep(PCAP_RECONNECT_TIMEOUT);
if (suricata_ctl_flags != 0) {

Loading…
Cancel
Save