Skip to content

Commit c41959a

Browse files
committed
netflow feeds should still use now() for timestamp
1 parent 9cb0a2d commit c41959a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/sflowtool.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -2266,7 +2266,7 @@ static int NFFlowSequenceNo = 0;
22662266
static void sendNetFlowV5Datagram(SFSample *sample)
22672267
{
22682268
NFFlowPkt5 pkt;
2269-
uint32_t now = sample->pcapTimestamp ?: sample->readTimestamp;
2269+
uint32_t now = time(NULL);
22702270
uint32_t bytes;
22712271
/* ignore fragments */
22722272
if(sample->s.ip_fragmentOffset > 0) return;
@@ -2345,7 +2345,7 @@ static void sendNetFlowV9Datagram(SFSample *sample)
23452345
{
23462346
NFFlowPkt9 pkt;
23472347

2348-
uint32_t now = sample->pcapTimestamp ?: sample->readTimestamp;
2348+
uint32_t now = time(NULL);
23492349
uint32_t bytes;
23502350
uint16_t i = 0;
23512351
const size_t fieldCount = NFFLOW9_NUM_ELEMENTS;
@@ -2440,7 +2440,7 @@ static void sendNetFlowV9V6Datagram(SFSample *sample)
24402440
{
24412441
NFFlowPkt9_v6 pkt;
24422442

2443-
uint32_t now = sample->pcapTimestamp ?: sample->readTimestamp;
2443+
uint32_t now = time(NULL);
24442444
uint32_t bytes;
24452445
uint16_t i = 0;
24462446
const size_t fieldCount = NFFLOW9_V6_NUM_ELEMENTS;

0 commit comments

Comments
 (0)