@@ -520,21 +520,33 @@ fds_ipfix_filter_eval(struct fds_ipfix_filter *ipxfil, struct fds_drec *record)
520520enum fds_ipfix_filter_match
521521fds_ipfix_filter_eval_biflow (struct fds_ipfix_filter * ipxfil , struct fds_drec * record )
522522{
523- int result = 0 ;
523+ if (record -> tmplt -> flags & FDS_TEMPLATE_BIFLOW ) {
524+ int result = 0 ;
524525
525- ipxfil -> lookup_state .source_idx = 0 ;
526- ipxfil -> lookup_state .find_flags = FDS_DREC_BIFLOW_FWD ;
527- if (fds_filter_eval (ipxfil -> filter , record )) {
528- result |= FDS_IPFIX_FILTER_MATCH_FWD ;
529- }
526+ ipxfil -> lookup_state .source_idx = 0 ;
527+ ipxfil -> lookup_state .find_flags = FDS_DREC_BIFLOW_FWD ;
528+ if (fds_filter_eval (ipxfil -> filter , record )) {
529+ result |= FDS_IPFIX_FILTER_MATCH_FWD ;
530+ }
530531
531- ipxfil -> lookup_state .source_idx = 0 ;
532- ipxfil -> lookup_state .find_flags = FDS_DREC_BIFLOW_REV ;
533- if (fds_filter_eval (ipxfil -> filter , record )) {
534- result |= FDS_IPFIX_FILTER_MATCH_REV ;
535- }
532+ ipxfil -> lookup_state .source_idx = 0 ;
533+ ipxfil -> lookup_state .find_flags = FDS_DREC_BIFLOW_REV ;
534+ if (fds_filter_eval (ipxfil -> filter , record )) {
535+ result |= FDS_IPFIX_FILTER_MATCH_REV ;
536+ }
536537
537- return result ;
538+ return result ;
539+
540+ } else {
541+ ipxfil -> lookup_state .source_idx = 0 ;
542+ ipxfil -> lookup_state .find_flags = 0 ;
543+
544+ if (fds_filter_eval (ipxfil -> filter , record )) {
545+ return FDS_IPFIX_FILTER_MATCH_FWD ;
546+ } else {
547+ return FDS_IPFIX_FILTER_NO_MATCH ;
548+ }
549+ }
538550}
539551
540552void
0 commit comments