diff options
| author | songyanchao <[email protected]> | 2024-04-14 12:07:39 +0800 |
|---|---|---|
| committer | songyanchao <[email protected]> | 2024-04-14 12:07:39 +0800 |
| commit | 3741ecd4d7dd287533e67577d44f5837035966c2 (patch) | |
| tree | 37c45f4b68f536f5ed79d428658af979fd484a62 | |
| parent | 3feb615b264dcfea91524f6b01b81d75d05967be (diff) | |
🐞 fix: Fixed an issue where the Classifier rule change check behaved abnormally when multiple virtual systems shared the same rule set.
Fixed an issue where the Classifier rule change check behaved abnormally when multiple virtual systems shared the same rule set.
| -rw-r--r-- | service/src/node_classifier.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/service/src/node_classifier.c b/service/src/node_classifier.c index 22374b5..2ad96c8 100644 --- a/service/src/node_classifier.c +++ b/service/src/node_classifier.c @@ -50,15 +50,15 @@ static inline int classifier_rules_changed(struct rule_list_parsed * old_rules, return RT_SUCCESS; } - for (uint32_t index = 0; index < old_rules->nr_rules; index++) + for (uint32_t new_index = 0; new_index < new_rules->nr_rules; new_index++) { int is_found = 0; - struct rule_field_parser * new_rule = &new_rules->rules[index]; + struct rule_field_parser * new_rule = &new_rules->rules[new_index]; for (uint32_t old_index = 0; old_index < old_rules->nr_rules; old_index++) { struct rule_field_parser * old_rule = &old_rules->rules[old_index]; - if (new_rule->rule_id == old_rule->rule_id) + if ((new_rule->rule_id == old_rule->rule_id) && (new_rule->priority == old_rule->priority)) { if (memcmp(new_rule, old_rule, sizeof(struct rule_field_parser)) != 0) { |
