Repository navigation
Conversation
|
As far as I understand it, it should be possible to either specify match sets like this: match-set: src dest,dest2or like this: match-set:
- src dest
- other_src flag1,flag2Thus like I mentioned in #29423, you can't split the string on commas, as it would break the string case with multiple flags. Also like mentioned, rule is a list, so you have to use You also need to take care to extract negations properly, so that it's possible to specify the following rule: match-set:
- ! src destThe current suggestion would build the rule as There is a function to help with the negations, |
|
@cachedout |
|
Thanks @l13t . Please let me know when this is ready to go. |
|
@l13t Good work on the negations! Just remember to use |
|
Oh... Only now I understand about what you were talking ((((: |
|
Hi @l13t . Are there still changes to be made with this one? Please let me know when it is ready to go. Thanks! |
|
You can merge this changes. I'll try later to rewrite this module in state like in was suggested with python-iptables. |
|
Negative, this can not be merged until the change uses rule.append or it won't work. Write a simple test case to build_url (there are several already) and you'll see. |
|
Based on @l13t's work I added some tests, the suggested fix doesn't remove the negated string from the original match-set, and as I've pointed out, fails to append the rule since it doesn't use rule.append. I fixed these issues and added tests in this commit, which I can open a new PR for if desired and then we close this, or the changes can be ported by @l13t into this PR and rebased. |
|
@thusoy |
|
OK, based on what I'm reading here it sounds like the decision is to close this PR and wait for a new one from @thusoy . I'll close this one for the time being. Thanks to you both for the good discussion here. |
|
@cachedout Cool, new PR is here |
Based on work by @l13t in saltstack#29426. Added tests and fixed incorrect appending of the built rule. Closes saltstack#29423.
Based on work by @l13t in saltstack#29426. Added tests and fixed incorrect appending of the built rule. Closes saltstack#29423.
No description provided.