Skip to content

firewall: T7112: Default action drop fails - #4834

Merged
sever-sever merged 1 commit into
vyos:currentfrom
alexandr-san4ez:T7112-current
Nov 6, 2025
Merged

firewall: T7112: Default action drop fails#4834
sever-sever merged 1 commit into
vyos:currentfrom
alexandr-san4ez:T7112-current

Conversation

@alexandr-san4ez

Copy link
Copy Markdown
Contributor

Change summary

Prevent KeyError by safely handling missing 'member' dict in zone config.
Add smoketest to verify commit fails gracefully when zone has no interfaces.

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)

Manual test

vyos@vyos:~$ conf
vyos@vyos# set firewall zone wan default-action drop
vyos@vyos# commit
[ firewall ]
Zone "wan" has no interfaces and is not the local zone
[[firewall]] failed
Commit failed

Smoketest

$ /usr/libexec/vyos/tests/smoke/cli/test_firewall.py
...
test_zone_basic (__main__.TestFirewall.test_zone_basic) ... ok
test_zone_flow_offload (__main__.TestFirewall.test_zone_flow_offload) ... ok
test_zone_with_vrf (__main__.TestFirewall.test_zone_with_vrf) ... ok
test_zone_without_member (__main__.TestFirewall.test_zone_without_member) ... 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

@github-actions

github-actions Bot commented Nov 5, 2025

Copy link
Copy Markdown

👍
No issues in PR Title / Commit Title

Prevent `KeyError` by safely handling missing 'member' dict in zone config.
Add smoketest to verify commit fails gracefully when zone has no interfaces.
@github-actions

github-actions Bot commented Nov 5, 2025

Copy link
Copy Markdown

CI integration ❌ failed!

Details

CI logs

  • CLI Smoketests (no interfaces) ❌ failed
  • CLI Smoketests VPP 👍 passed
  • CLI Smoketests (interfaces only) 👍 passed
  • Config tests 👍 passed
  • Config tests VPP 👍 passed
  • RAID1 tests 👍 passed
  • TPM tests 👍 passed

@sarthurdev sarthurdev added the bp/circinus Create automatic backport for circinus label Nov 6, 2025

@sarthurdev sarthurdev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes KeyError if member not defined. Code looks good and includes smoketest (passes).

@sever-sever sever-sever left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not allow the use of action without an interface if it is not local zone

@sever-sever
sever-sever merged commit 6140414 into vyos:current Nov 6, 2025
16 of 17 checks passed
@vyosbot vyosbot added mirror-initiated This PR initiated for mirror sync workflow mirror-completed and removed mirror-initiated This PR initiated for mirror sync workflow labels Nov 6, 2025
@andamasov andamasov removed the bp/circinus Create automatic backport for circinus label May 9, 2026
@github-actions github-actions Bot added the rebase label May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

5 participants