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

Allowing ICMP types. #1218

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

oliparcol
Copy link

@oliparcol oliparcol commented Apr 30, 2024

Summary

The regexp used to convert ICMP string codes to integer was updated in the v7 refactor and the new one doesn't allow anymore passing strings of the type <icmp type>/<icmp code> (e.g. 3/4). This is used to generate rules of the type:

 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     1    --  *      *       0.0.0.0/0            0.0.0.0/0            state NEW icmptype 3 code 4 /* Allow ICMP fragmentation needed */

The function icmp_name_to_number returns nil when a string of the type <icmp type>/<icmp code> is used in the icmp property.

Checklist

  • 🟢 Spec tests.
  • 🟢 Acceptance tests.
  • Manually verified. (For example puppet apply)

@CLAassistant
Copy link

CLAassistant commented Apr 30, 2024

CLA assistant check
All committers have signed the CLA.

@oliparcol oliparcol marked this pull request as ready for review April 30, 2024 19:56
@oliparcol oliparcol requested a review from a team as a code owner April 30, 2024 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants