Skip to content

Commit 372af73

Browse files
committed
Make nfcapd less chatty, if a buffer reset happends. See #622
1 parent afa4a69 commit 372af73

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/netflow/ipfix.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1291,6 +1291,7 @@ static void Process_ipfix_data(exporterDomain_t *exporter, uint32_t ExportTime,
12911291
}
12921292

12931293
void *outBuff;
1294+
int redone = 0;
12941295
REDO:
12951296
// map file record to output buffer
12961297
outBuff = GetCurrentCursor(fs->dataBlock);
@@ -1323,7 +1324,7 @@ static void Process_ipfix_data(exporterDomain_t *exporter, uint32_t ExportTime,
13231324
}
13241325

13251326
// request new and empty buffer
1326-
LogInfo("Process ipfix: Sequencer run - resize output buffer");
1327+
dbg_printf("Process ipfix: Sequencer run - resize output buffer\n");
13271328
// request new and empty buffer
13281329
fs->dataBlock = WriteBlock(fs->nffile, fs->dataBlock);
13291330
if (fs->dataBlock == NULL) {
@@ -1337,6 +1338,11 @@ static void Process_ipfix_data(exporterDomain_t *exporter, uint32_t ExportTime,
13371338
dbg_printf("Process_ipfix: output buffer size error. Skip ipfix record processing");
13381339
return;
13391340
}
1341+
redone++;
1342+
if (redone > 2) {
1343+
LogError("Process_ipfix: Redone loop - output buffer size error. Skip ipfix record processing");
1344+
return;
1345+
}
13401346
goto REDO;
13411347
break;
13421348
}

0 commit comments

Comments
 (0)