Skip to content

Commit cbfbe79

Browse files
committed
unirec: BUGFIX check "todo" list of fields
When the list of IPFIX fields of a record is processed, the plugin checks the list of remaining UniRec fields that are required. If some required UniRec field is not filled, the message cannot be sent. This patch fixes the condition that distinguishes end of the list with everything filled and not-filled-yet field.
1 parent 7c37060 commit cbfbe79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extra_plugins/output/unirec/translator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ translator_translate(translator_t *trans, struct conf_unirec *conf, struct fds_d
780780
/* just check the whole array */
781781
}
782782

783-
if (trans->todo_fields[i] != 0) {
783+
if (i < trans->urtmpl->count && trans->todo_fields[i] != 0) {
784784
IPX_CTX_WARNING(trans->ctx, "There is some required field that was not filled (%s), processed %d fields.", ur_get_name(trans->urtmpl->ids[i]), converted_fields);
785785
return 0;
786786
}

0 commit comments

Comments
 (0)