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

nftables::simplerule should follow the same rules as nftables::rule #58

Closed
nbarrientos opened this issue Jan 13, 2021 · 0 comments · Fixed by #59
Closed

nftables::simplerule should follow the same rules as nftables::rule #58

nbarrientos opened this issue Jan 13, 2021 · 0 comments · Fixed by #59
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@nbarrientos
Copy link
Collaborator

How to reproduce (e.g Puppet code you use)

  nftables::simplerule{'thanos_gRPC-store':
    action => 'accept',
    dport  => 161,
    proto  => 'udp6',
    saddr  => '2001:1458:d00:3b::100:23b',
  }

What are you seeing

Error while evaluating a Resource Statement, Nftables::Rule[default_in-thanos_gRPC-store]: parameter 'rulename' expects a match for Pattern[/^[a-zA-Z0-9_]+-[a-zA-Z0-9_]+(-\d+)?$/], got 'default_in-thanos_gRPC-store'

What behaviour did you expect instead

Compilation faillure, but at nftables::simplerule level.

This regex:

https://github.com/duritong/puppet-nftables/blob/master/manifests/simplerule.pp#L57

Should be a mirror of the second part of this one:

https://github.com/duritong/puppet-nftables/blob/master/manifests/rule.pp#L6

Trivial fix. Add a test to cover a possible regression.

@nbarrientos nbarrientos added the bug Something isn't working label Jan 13, 2021
@nbarrientos nbarrientos changed the title nftables::simplerule should follow the same rules as nftables::rule nftables::simplerule should follow the same rules as nftables::rule Jan 13, 2021
@nbarrientos nbarrientos added the good first issue Good for newcomers label Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant