Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

NFLOG #196

Closed
wants to merge 18 commits into from
Closed

NFLOG #196

wants to merge 18 commits into from

Conversation

dzamlo
Copy link
Contributor

@dzamlo dzamlo commented Nov 20, 2021

This is a draft implementation of support for NFLOG.

I'm interested in a general feedback, before I finish.

  • The example need more work
  • Tests are missing
  • There is still some todos

Unfortunately, I have limited access to my computer, so I may not respond quickly

@dzamlo dzamlo marked this pull request as draft November 20, 2021 16:46
@little-dude little-dude self-requested a review November 21, 2021 07:46
@little-dude
Copy link
Owner

Hey @dzamlo thanks a lot for the PR. I didn't have much time today to review it in depth but overall I think it's a great start. I'll give it a more in-depth review next week-end. Feel free to finish it off in the meantime, I don't think I'm going to ask for big changes before merging this in.

@dzamlo
Copy link
Contributor Author

dzamlo commented Nov 25, 2021

I didn't have time to add tests and I'm not very happy with the example.

Unfortunately, I won't have time to do that until next week, at best.

@little-dude
Copy link
Owner

That's fine. It's more than enough for me to start reviewing :) I also have other PRs waiting for me, so no rush. Thanks a lot!

@dzamlo
Copy link
Contributor Author

dzamlo commented Nov 26, 2021

Hi @stbuehler , I just realised you worked on netfilter related stuff by reading comments in #170. Could you take a look at this pr and see if I should rebase my work on what you did, or the opposite or if the two should remain separate?

@stbuehler
Copy link
Contributor

Hi @stbuehler , I just realised you worked on netfilter related stuff by reading comments in #170. Could you take a look at this pr and see if I should rebase my work on what you did, or the opposite or if the two should remain separate?

Hi, I don't think you did any major changes on the existing code, and #170 shouldn't change the API (I think) - so a simple merge should be fine in the end.

I don't think you considered the need for batch requests yet (netlink requires those for changes, at least for what I want to do), which is what #170 is all about - so you might want to rebase once #170 got merged if you want to test something like that.

(I used a very different way in my own code (not published anywhere yet :) ) to serialize/deserialize messages and their attributes (I went for proc_macro derive on structs where attributes represent field values), so I'm not sure I'd PR my own netfilter code to this repo - probably gonna keep it separate, so don't worry about that part.)

@dzamlo
Copy link
Contributor Author

dzamlo commented Nov 26, 2021

Hi @stbuehler , I just realised you worked on netfilter related stuff by reading comments in #170. Could you take a look at this pr and see if I should rebase my work on what you did, or the opposite or if the two should remain separate?

Hi, I don't think you did any major changes on the existing code, and #170 shouldn't change the API (I think) - so a simple merge should be fine in the end.

I don't think you considered the need for batch requests yet (netlink requires those for changes, at least for what I want to do), which is what #170 is all about - so you might want to rebase once #170 got merged if you want to test something like that.

(I used a very different way in my own code (not published anywhere yet :) ) to serialize/deserialize messages and their attributes (I went for proc_macro derive on structs where attributes represent field values), so I'm not sure I'd PR my own netfilter code to this repo - probably gonna keep it separate, so don't worry about that part.)

I was interested only in NFLOG and NFQUEUE which don't need the batch functionality, so #170 doesn't impact me. I was worried aboout the unpublished serialize/deserialize part. So everything is fine on this front.

@little-dude little-dude self-requested a review November 28, 2021 18:53
@dzamlo
Copy link
Contributor Author

dzamlo commented Dec 4, 2021

The only things missing are automated tests. I don't know when I will have the bandwidth to write any. Not soon unfortunately.

@little-dude
Copy link
Owner

Tbh I'd be willing to get this in already @dzamlo. Better than letting all this work hanging. I'll need some time to review though, and I'll likely won't have time over Christmas. But let's try to get this in in January :)

@dzamlo dzamlo marked this pull request as ready for review December 19, 2021 09:22
@dzamlo
Copy link
Contributor Author

dzamlo commented Dec 19, 2021

As much as I like this PR to be be top notch, I have literraly zero bandwidth to finalize it (I have acess to my phone to write answer here, but not my laptop to code). But this PR is at least manually tested, so there is that.

After a review you may want to squash most commit, but It simpler for me and likely simpler to review like it is now.

@little-dude little-dude changed the title Draft: NFLOG NFLOG Dec 19, 2021
@astro
Copy link

astro commented Feb 9, 2022

I've given this PR a try. The code works for me.

@dzamlo Are you open to financial or material support?

@dzamlo
Copy link
Contributor Author

dzamlo commented Feb 9, 2022

The code should work well. What's missing is automated tests and I was, at the time, not very happy with the example.

I wasn't able to work on that at the time of the PR and I forgot this PR after that. I don't know if I will have any time for this PR soon.

I cannot accept any financial/material help.

@little-dude
Copy link
Owner

@astro I'm planning to spend some time releasing this, hopefully tomorrow. As I said earlier, I think even without tests, having a basic nflog crate is a net win. I just haven't really had the time/motivation to do it so far :S

@little-dude
Copy link
Owner

I'm going to close this since I'll merge and release from #235. Thank you again @dzamlo !

@little-dude
Copy link
Owner

@dzamlo @astro 0.1.0 is available: https://crates.io/crates/netlink-packet-netfilter

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants