-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.rules-files array not parsed last #80
Comments
|
If you update the include to it will error...
With it at the bottom, it results in...
Which is also bad as the include sets .sagan-core.geoip.country_database to '/usr/local/share/GeoIP/GeoLite2-Country.mmdb'. |
Also for client-stats, the top errors, but the bottom works.
Both should be the same, but the order is different. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Apparently the .rule-files array does not handle arbitrary placement nicely. So if the include for it or it comes to early, then stuff like GeoIP or the like is not seen as enabled, even if it is in the config.
This can be reproduced easily by making sure the first item in the config is the include pointing to the rules include.
The best way to fix this is after reading in all the configs and merging them them to one complex hash(or whatever the C equivalent is here), don't process any of the rules files till after the rest of the keys have been handled. Just push entries in it into a array while processing the hash and then once done with everything else process that array and load all the rules. This the rules don't run into any dependency issues.
The text was updated successfully, but these errors were encountered: