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

trace/git commit moving from 0.13 to 0.20 -- search engine fodder #123

Open
mcr opened this issue Jun 20, 2024 · 2 comments
Open

trace/git commit moving from 0.13 to 0.20 -- search engine fodder #123

mcr opened this issue Jun 20, 2024 · 2 comments

Comments

@mcr
Copy link
Contributor

mcr commented Jun 20, 2024

I unstuck my Cargo.lock while trying something else out, and wound up with the upgrade to rtnetlink 0.14.1, and netlink-packet-route 0.20. So, actually rtnetlink 0.14.1 wants netlink-packet-route 0.19, which I discovered, at which point I moved to github rtnetlink.

While there were a few deprecation notices (and I don't actually understand xfrmtun_link's third argument yet), in many cases, I just had to grep. Yes, Bridge "MASTER" now becomes Controller, but I didn't actually figure out what happens to the slave device attributes.
Please, maybe a few more comments in the code, like "// this used to be SlaveKind" or something would really help.

Anyway, I gathered it all together as:
AnimaGUS-minerva/connect@9279594

and at least, at this point it compiles. It does not pass tests, because my tests involve constructing netlink messages to feed into the loop that processes them, and the non_exhaustive attribute breaks that. I hope all the right ::new() methods exist.

As for Kernels that change the structure: I would suggest that rather than attempt to match every structure, that the structures maybe should just be dated or KernelVersionNumbered, with new structures created. Maybe. It's really a tuscle.

BTW: in many cases, I print any netlink message I don't understand, because sometimes they are important to process, and sometimes they are just noise. So for some things, if I don't know how to translate to new naming, I just comment out the ignore, and {:?} will print it out for me, and I'll put back the right ignores.
(This is an RFC8994 daemon, btw. It creates and lives in three network namespaces)

@mcr
Copy link
Contributor Author

mcr commented Jun 20, 2024

Updating my test cases to construct the objects I wanted "manually" rather than with a struct was much easier than I thought.

AnimaGUS-minerva/connect@d4753ba

@cathay4t
Copy link
Member

cathay4t commented Jul 3, 2024

We have https://github.com/rust-netlink/netlink-packet-route/blob/main/CHANGELOG which might help you understand the changes.

For include kernel version in struct, my quick answer is no. These crates are supposed to work on old kernels. It is a bug if we failed so.

Frankly speaking, I don't understand your expectation from this issue.

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

No branches or pull requests

2 participants