Comments (11)
I think the issue might be that the underlying mdlayher/netlink library is not big-endian compatible: mdlayher/netlink#201 (many tests are skipped on big-endian systems in that package).
from nftables.
It is big endian compatible, but a lot of the tests use byte fixtures that are little endian. I don't have access to any big endian machines, but PRs are welcome.
from nftables.
Thanks for the reassuring answer regarding the code's correctness. I've decided to go ahead and upload a package that allows the test suite to fail on big endian archs.
I'm not really a Go developer or a porter, so I can't really provide a pull request to fix the tests. However, I do have access to a s390x porter box (via Debian), and can test any commits or branches you'd like me to.
from nftables.
Thanks for having a look, @mdlayher. Please let us know here when a new netlink release is available and I can pull that in :)
from nftables.
No worries! I will try to do that today.
from nftables.
I've released netlink v1.7.1 and genetlink v1.3.1 which fix all known endianness test failures. A lot of my tests hardcode fixed little endian byte dumps which isn't ideal but is useful for development.
from nftables.
Thanks, now pulled in!
@CyrilBrulebois Can you check which issues remain, if any, please?
from nftables.
@stapelberg Sure thing, but as far as I understand:
- netlink is BE compatible;
- netlink's tests were not BE compatible; that's confirmed to be fixed in the last release.
- nftables is believed to be BE compatible as well?
- nftables's tests are not BE compatible; the updated dependency on netlink doesn't change that, so the failures are exactly the same as before (at least from glancing at them, I can do a more systematic review if you prefer).
from nftables.
I only had a brief look thus far, maybe I have misinterpreted what I was seeing.
I’m not sure if I get a chance to have a closer look over the next few weeks, so any help with this is appreciated.
from nftables.
Hi @CyrilBrulebois and @stapelberg,
I have created a draft PR #218 with a fix approach for one test. In the log file, I see that there are a lot of failed test cases and I can change them all. Unfortunately, as there are a lot of tests to change, this requires time and I would like to get this approach reviewed and tested against a BE system before proceeding with a complete refactor.
If you can, please let me know whether this fixed the test on a BE system and whether this approach makes sense. If you have ideas how to best tackle this issue (e.g. skip tests on BE systems? or something else?), feel free to let me know.
from nftables.
I don’t have time to test on s390x currently, so if @CyrilBrulebois could give the PR a shot, that’d be great! Thanks.
from nftables.
Related Issues (20)
- Reason for not wrapping libnftnl/libmnl. HOT 1
- GetRules lost expr.Masq HOT 1
- nftables go dynset implementation will not work with libnftnl versions <1.1.9 HOT 1
- High
- Feature: add support for monitor HOT 6
- AddSet IPv4 wrong byte order on Ubuntu 22.04 HOT 8
- Rule Handle not updated after InsertRule even using Flush. HOT 4
- Not all response messages are received causing the receive buffer to overflow HOT 8
- Named quotas and their usage in map HOT 1
- BUG: block in Conn.Flush() HOT 4
- How to get an error when try to add an existed table?
- Adding rules in code produces different results and logs than the rules I added directly from the command line HOT 6
- Use a CIDR prefix as target in a NAT rule HOT 3
- Troubleshooting NFTables Table Creation with Go HOT 2
- Objects implementation refactor HOT 1
- Broken deps HOT 3
- Is there a way to mock interface? HOT 3
- [FR] Simplified Method for Determining if IP+Port is Whitelisted or Blacklisted HOT 6
- cgroupv2 nft rule HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nftables.