Skip to content

Commit

Permalink
Fix AS mmdb lookup for flow addregation
Browse files Browse the repository at this point in the history
  • Loading branch information
phaag committed Jul 19, 2024
1 parent 62b8fb1 commit 9965ceb
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/nfdump/nflowcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,11 +747,19 @@ static inline int New_HashKey(void *keymem, recordHandle_t *recordHandle, int sw
}
aggregate_param_t *param = &aggregationTable[tableIndex].param;

uint8_t local[128];
void *inPtr = recordHandle->extensionList[param->extID];
if (inPtr == NULL) continue;
inPtr += param->offset;

preprocess_t preprocess = aggregationTable[tableIndex].preprocess;
if (inPtr == NULL) {
if (preprocess != NOPREPROCESS) {
inPtr = (void *)local;
memset((void *)local, 0, sizeof(local));
} else {
continue;
}
} else {
inPtr += param->offset;
}
PreProcess(inPtr, preprocess, recordHandle);

keyLen += param->length;
Expand Down

0 comments on commit 9965ceb

Please sign in to comment.