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

T5416: fix ipsec matcher #2121

Merged
merged 1 commit into from
Jul 31, 2023
Merged

T5416: fix ipsec matcher #2121

merged 1 commit into from
Jul 31, 2023

Conversation

nicolas-fort
Copy link
Contributor

Change Summary

Fix ipsec matcher,

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Component(s) name

firewall

Proposed changes

Quick fix for ipsec matcher when ipsec is missing.

How to test

vyos@vyos# run show config comm | grep FOO
set firewall name FOO rule 10 action 'drop'
set firewall name FOO rule 10 ipsec match-none
set firewall name FOO rule 10 protocol 'gre'
set firewall name FOO rule 20 action 'drop'
set firewall name FOO rule 20 ipsec match-ipsec
set firewall name FOO rule 20 protocol 'gre'
[edit]
vyos@vyos# 
vyos@vyos# sudo nft list chain ip vyos_filter NAME_FOO
table ip vyos_filter {
        chain NAME_FOO {
                meta l4proto gre meta ipsec missing counter packets 0 bytes 0 drop comment "FOO-10"
                meta l4proto gre meta ipsec exists counter packets 0 bytes 0 drop comment "FOO-20"
                counter packets 0 bytes 0 drop comment "FOO default-action drop"
        }
}
[edit]
vyos@vyos# cat /run/nftables.conf | grep ipsec
        meta l4proto  gre meta ipsec == 0 counter drop comment "FOO-10"
        meta l4proto  gre meta ipsec == 1 counter drop comment "FOO-20"
[edit]
vyos@vyos# 

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

@vyosbot vyosbot requested review from a team, dmbaturin, sarthurdev, zdc, jestabro, sever-sever and c-po and removed request for a team July 31, 2023 10:12
@sever-sever
Copy link
Member

Do the options do the same (with and without secpath)?

meta l4proto gre meta ipsec missing 

and

meta l4proto gre meta secpath missing

@c-po c-po merged commit 6335bbf into vyos:current Jul 31, 2023
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants