Skip to content
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

Fix default for the --ignore flag #116

Closed
wants to merge 1 commit into from

Conversation

vidushi4
Copy link
Contributor

suricata-update doesn't properly load some sections in update.yaml file.
Example:
Even after setting the following in update.yaml

ignore:
  - "*deleted.rules" 
  - "*pop3.rules"
$ ./bin/suricata-update -v

generates

16/3/2019 -- 03:14:59 - <Debug> -- Parsing rules/emerging-pop3.rules.
16/3/2019 -- 03:15:01 - <Debug> -- Parsing rules/emerging-deleted.rules.

which means the files do not get ignored. It seems that the code loading command line parameters override previous settings even when no parameters are given.

Thus changing the default for the --ignore flag from "[]" to "None", fixes the issue.

Make sure these boxes are signed before submitting your Pull Request
-- thank you.

Link
to
redmine ticket:
https://redmine.openinfosecfoundation.org/issues/2851
Describe changes:
Fixes default for the --ignore flag from "[]" to "None"

suricata-update doesn't properly load some sections in update.yaml file. 
Example: 
Even after setting the following in update.yaml
```
ignore:
  - "*deleted.rules" 
  - "*pop3.rules"
```

```
$ ./bin/suricata-update -v
```
generates
```
16/3/2019 -- 03:14:59 - <Debug> -- Parsing rules/emerging-pop3.rules.
16/3/2019 -- 03:15:01 - <Debug> -- Parsing rules/emerging-deleted.rules.
```
which means the files do not get ignored. It seems that the code loading command line parameters override previous settings even when no parameters are given. 
Thus changing the default for the --ignore flag from "[]" to "None", fixes the issue.

Closes Redmine ticket #2851.
@vidushi4 vidushi4 requested a review from jasonish as a code owner March 15, 2019 22:01
@vidushi4
Copy link
Contributor Author

@shivan1b Could you please review the changes and let me know if all the contribution guidelines are followed or if any changes are needed?

Copy link

@shivan1b shivan1b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

Copy link
Member

@jasonish jasonish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@vidushi4
Copy link
Contributor Author

Thank you @jasonish and @shivan1b

@satta
Copy link
Contributor

satta commented Mar 26, 2019

Thanks for this fix, this issue effectively broke the ignore functionality for us.

@shivan1b
Copy link

Merged into master.

@shivan1b shivan1b closed this Mar 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants