Bug #1472
closedShould 'goodsigs' be 'goodtotal' when checking if signatures were loaded in detect.c?
Description
Around line 468 in detect.c, there is a check for goodsigs <=0...
...
/* now we should have signatures to work with */
if (goodsigs <= 0) {
if (cntf > 0) {
SCLogWarning(SC_ERR_NO_RULES_LOADED, "%d rule files specified, but no rule was loaded at all!", cntf);
...
Shouldn't this check be on goodtotal instead? Otherwise, the check only covers the number of rules loaded from the last rules file read, not all of them.
Updated by Victor Julien over 9 years ago
- Assignee set to Alexander Gozman
Alexander could you check this one? You've been playing with this code so it should still be 'fresh' to you :) Thanks!
Updated by Alexander Gozman over 9 years ago
Victor Julien wrote:
Alexander could you check this one? You've been playing with this code so it should still be 'fresh' to you :) Thanks!
Ok, I'll take a look at it.
Updated by Alexander Gozman over 9 years ago
Victor Julien wrote:
Alexander could you check this one? You've been playing with this code so it should still be 'fresh' to you :) Thanks!
It seems that it's not a problem anymore, because there is a SigFileLoaderStat structure with 'total' counters:
typedef struct SigFileLoaderStat_ { int bad_files; int total_files; int good_sigs_total; int bad_sigs_total; } SigFileLoaderStat;
So there should not be any misunderstandings as we have, for instance, good_sigs variable for a current file, and good_sigs_total as a summary.
Updated by Victor Julien over 9 years ago
- Status changed from New to Closed
- Target version set to 3.0RC1
- % Done changed from 0 to 100
Thanks Alexander!