-
Notifications
You must be signed in to change notification settings - Fork 457
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
add support for using rpfilter in rules #1059
Conversation
|
Hello! 👋 This pull request has been open for a while and has had no recent activity. We've labelled it with If you are waiting on a response from us we will try and address your comments on a future Community Day. Alternatively, if it is no longer relevant to you please close the PR with a comment. Please note that if a pull request receives no update for 7 after it has been labelled, it will be closed. We are always happy to re-open pull request if they have been closed in error. |
|
I have updated the code so that the tests should run fine now |
|
@cmusik |
|
@david22swan I have fixed them and now there should be no syntax problem |
|
@cmusik While this looks good to me on a first glance I would prefer that it have at least one test to cover the new functionality. |
|
right now the rpfilter option allows you only to specify one argument so this fix here is to parse it correctly if there are more arguments set. We have applications which are creating rpfilter rules with more then one argument and this leads to this warning specified in the description. So I'm not sure how to test it without fixing the other problem (right now I'm struggling with this). |
|
Ok, I have found the missing steps and updated the PR. Now I still need to add a test case for the new functionality. |
|
@cmusik has there been any update with adding a test for the new functionality? |
|
@jordanbreen28 is there any guide how to implement and running the acceptance tests? I have worked a lot with pdk and unit tests but struggling with the acceptance tests |
|
Hi @jordanbreen28, I have finally managed to get the acceptance to run and extended them for the rpfilter feature |
|
@cmusik Thank you for all your work on this! It seems that the spec tests are failing with We are aware of this and are working to rectify, it is unrelated to this PR. Please rebase with the current main so we can proceed. P.s. we are also aware of the PR testing failures for this module and they are unrelated to this PR. :-) |
|
@jordanbreen28 I have rebased the branch. And yes - I have already noticed that the tests are failing. I had also some problems with litmus tests from the main branch. |
|
@cmusik Look's like you've just got a simple syntax failure here: |
|
@david22swan this problem was not introduced by me and was fixed a few days ago in the puppetlabs main branch. I have rebased again and it should work now |
|
I have somehow missed one rubocop warning. This is fixed now and hopefully this was the last problem with this PR :) |
|
Hi @cmusik - Apologies for the wait with this one, can you rebase with the current main and I will work on getting this merged in! :-) |
|
Hi @jordanbreen28, I have rebased it again. |
|
@cmusik great! Once tests have completed and are green I'll merge in. |
When rules with rpfilter are used, then there are warnings like these in the output:
Warning: Puppet::Type::Firewall::ProviderIptables: Skipping unparsable iptables rule: keys (5) and values (6) count mismatch on line: -A cali-PREROUTING -m comment --comment "cali:mPIOOWmbH3iO0R90" -m mark --mark 0x40000/0x40000 -m rpfilter --validmark --invert -j DROP