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

T6265: firewall: allow only ethernet interfaces to flowtables. #3414

Closed
wants to merge 1 commit into from

Conversation

nicolas-fort
Copy link
Contributor

Change Summary

Allow only ethernet interfaces to flowtables.

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)

Related PR(s)

Component(s) name

firewall

Proposed changes

How to test

vyos@ftables# set firewall flowtable ft01 interface eth1
[edit]
vyos@ftables# commit
[edit]
vyos@ftables# set firewall flowtable ft02 interface 
Possible completions:
   <text>               Interfaces to use this flowtable
   eth0                 
   eth1                 
   eth2                 
   eth3                 
   lo                   

      
[edit]
vyos@ftables# set firewall flowtable ft02 interface br0

  
  
  Only ethernet and loopback interfaces are allowed in flowtables
  Value validation failed
  Set failed

[edit]
vyos@ftables# 

Example of migration:

root@latest:/home/vyos# show config comm | grep flowt
set firewall flowtable ft01 interface 'br0'
set firewall flowtable ft01 interface 'eth2'
set firewall flowtable ft01 interface 'eth3.33'
set firewall flowtable ft02 interface 'eth1'
set firewall flowtable ft03 interface 'lo'
set firewall flowtable ft04 interface 'eth0'
set firewall flowtable ft04 interface 'eth3'
set firewall flowtable ft05 interface 'vti0'
root@latest:/home/vyos# ./mig-test.sh config.boot
root@latest:/home/vyos# vyos-config-to-commands config.boot | grep flowt
set firewall flowtable ft01 interface 'eth2'
set firewall flowtable ft02 interface 'eth1'
set firewall flowtable ft03 interface 'lo'
set firewall flowtable ft04 interface 'eth0'
set firewall flowtable ft04 interface 'eth3'
set firewall flowtable ft05 interface 'lo'
root@latest:/home/vyos# 

Smoketest result

test_firewall.py --> OK

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

@sever-sever sever-sever requested review from a team, dmbaturin, sarthurdev, zdc, jestabro, sever-sever and c-po and removed request for a team May 7, 2024 09:09
@nicolas-fort
Copy link
Contributor Author

Changing it to draft as more checks are needed

@nicolas-fort nicolas-fort marked this pull request as draft May 7, 2024 10:40
@nvollmar
Copy link
Contributor

nvollmar commented May 7, 2024

Not sure how it is handled in VyOS, but on my other Debian based systems ethernet NICs may also end up as enoX (ocp slots) or enpXsY (pci slots). ensX or enxMACADR are also possible on systemd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants