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

firewall: T6257: Show member information for dynamic groups in op-mode #3369

Merged
merged 1 commit into from May 1, 2024

Conversation

sarthurdev
Copy link
Member

Change Summary

Show member information for dynamic groups in op-mode

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

op-mode, firewall

Proposed changes

How to test

vyos@vyos# run show firewall group
Firewall Groups

Name    Type                    References            Members          Timeout    Expires
------  ----------------------  --------------------  -------------  ---------  ---------
TEST    address_group           N/D                   127.0.0.1
DYN-01  address_group(dynamic)  ipv4-input-filter-10  192.168.77.39         10          1
DYN-02  address_group(dynamic)  ipv4-input-filter-20  192.168.0.245        120        104
                                                      192.168.77.39        120        117
                                                      192.168.77.40        120        117
vyos@vyos# run show firewall group detail
Firewall Groups

 Name        | TEST
 Description |
 Type        | address_group
 References  | N/D
 Members     | 127.0.0.1

 Name        | DYN-01
 Description |
 Type        | address_group(dynamic)
 References  | ipv4-input-filter-10
 Members     | 192.168.77.39 (timeout: 10, expires: 1)

 Name        | DYN-02
 Description |
 Type        | address_group(dynamic)
 References  | ipv4-input-filter-20
 Members     | 192.168.0.245 (timeout: 120, expires: 96)
             | 192.168.77.39 (timeout: 120, expires: 109)
             | 192.168.77.40 (timeout: 120, expires: 109)

Smoketest result

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 and zdc and removed request for a team April 26, 2024 17:41
@vyosbot vyosbot requested a review from jestabro April 26, 2024 17:41
@sarthurdev
Copy link
Member Author

@Mergifyio backport sagitta

Copy link

mergify bot commented Apr 26, 2024

backport sagitta

🛑 Command backport sagitta cancelled because of a new backport command with different arguments

out = []

try:
results_str = cmd(f'sudo nft -j list set {prefix} {table} {name}')
Copy link
Member

Choose a reason for hiding this comment

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

Should we have a function for easily calling NFTables with JSON output?

Copy link
Member

Choose a reason for hiding this comment

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

Good idea for a vyos.utils helper

@c-po c-po merged commit 91c1a85 into vyos:current May 1, 2024
9 checks passed
@c-po
Copy link
Member

c-po commented May 1, 2024

@Mergifyio backport sagitta

Copy link

mergify bot commented May 1, 2024

backport sagitta

✅ Backports have been created

c-po added a commit that referenced this pull request May 1, 2024
firewall: T6257: Show member information for dynamic groups in op-mode (backport #3369)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 participants