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

Simplify IP address normalizer with IP masks #39582

Merged
merged 1 commit into from
Nov 9, 2023
Merged

Conversation

Altahrim
Copy link
Collaborator

Summary

  • Try to simplify IP address normalizer with IP masks
  • Removes dead code (subnet sizes were never used)
  • Should be a little more efficient

Checklist

@Altahrim Altahrim added this to the Nextcloud 28 milestone Jul 26, 2023
@Altahrim Altahrim self-assigned this Jul 26, 2023
@Altahrim Altahrim force-pushed the simplify-ip-normalizer branch 2 times, most recently from 20a3563 to 4e99ada Compare July 26, 2023 18:58
@Altahrim Altahrim added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jul 26, 2023
@Altahrim Altahrim marked this pull request as ready for review July 26, 2023 19:49
@kesselb
Copy link
Contributor

kesselb commented Jul 27, 2023

Nice one 👍

We added https://github.com/mlocati/ip-lib as library recently.
Could we reuse some code from there?

@Altahrim
Copy link
Collaborator Author

Nice one +1

We added https://github.com/mlocati/ip-lib as library recently. Could we reuse some code from there?

Yes, I guess our normalizer can become some kind of wrapper around ip-lib but it will probably be a little more expensive.
It could maybe be part of another rewrite to make our normalizer more robust. Actually, I came to it because my webserver sent a unix socket instead of an IP address so my instance crashed.

@susnux susnux requested review from a team, ArtificialOwl, blizzz and Fenn-CS and removed request for a team August 16, 2023 23:34
@Altahrim Altahrim removed the 3. to review Waiting for reviews label Aug 28, 2023
@skjnldsv skjnldsv mentioned this pull request Nov 1, 2023
@blizzz blizzz mentioned this pull request Nov 6, 2023
Remove dead code

Signed-off-by: Benjamin Gaussorgues <[email protected]>
@Altahrim Altahrim requested a review from a team November 8, 2023 10:56
@Altahrim Altahrim requested a review from come-nc November 9, 2023 10:34
@Altahrim Altahrim merged commit a08281c into master Nov 9, 2023
50 checks passed
@Altahrim Altahrim deleted the simplify-ip-normalizer branch November 9, 2023 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants