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

Objects implementation refactor #259

Merged
merged 1 commit into from
Jul 29, 2024
Merged

Conversation

turekt
Copy link
Contributor

@turekt turekt commented Apr 17, 2024

Hi,

as per our discussion in #253, I have implemented a change for a more generic implementation of nftables objects. In addition to the refactor I have added a test to demonstrate that already implemented expressions are now supported as objects and made a few lint changes. Note that some of the expressions are currently not implemented in the lib (i.e. synproxy, ct_helper, ct_expect, ...). These can now be easily added to the expr package to offer support. I'll see to adding them after we agree on this refactor change.

Let me know what you think.

Copy link
Collaborator

@stapelberg stapelberg left a comment

Choose a reason for hiding this comment

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

Thanks, it’s very helpful to see the entire change laid out like that. I left a few detail questions.

counter.go Outdated Show resolved Hide resolved
expr/bitwise.go Outdated Show resolved Hide resolved
set.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@stapelberg stapelberg left a comment

Choose a reason for hiding this comment

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

Thanks, I think this looks good overall. Would it be possible to move the refactoring of the expr/*.go files into a separate commit? We could probably even submit that independently, as it should be a no-op, yes?

expr/expr.go Outdated Show resolved Hide resolved
obj.go Outdated Show resolved Hide resolved
obj.go Outdated Show resolved Hide resolved
obj.go Show resolved Hide resolved
@stapelberg
Copy link
Collaborator

Alright, PR #265 is now merged, so you can rebase this one.

quota.go Outdated Show resolved Hide resolved
obj.go Outdated Show resolved Hide resolved
obj.go Outdated Show resolved Hide resolved
obj.go Outdated Show resolved Hide resolved
@turekt turekt force-pushed the obj-impl-refactor branch 2 times, most recently from 717c691 to eab2afa Compare July 27, 2024 20:22
@turekt turekt requested a review from stapelberg July 27, 2024 20:24
Refactored obj.go to a more generic approach
Added object support for already implemented expressions
Added test for limit object
Fixes google#253
@stapelberg stapelberg merged commit 3b92800 into google:main Jul 29, 2024
2 checks passed
@turekt turekt mentioned this pull request Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants