Refurbish IPAllow with libswoc.#9193
Merged
SolidWallOfCode merged 1 commit intoapache:10-Devfrom Dec 4, 2022
Merged
Conversation
de38666 to
fe06eb5
Compare
Contributor
|
Looks good to me, I need this changes in for my records.yaml support. |
brbzull0
requested changes
Nov 15, 2022
This was referenced Nov 15, 2022
Merged
e7570d8 to
893dc1b
Compare
This was referenced Nov 20, 2022
893dc1b to
0142b7c
Compare
brbzull0
approved these changes
Nov 29, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update IPAllow with libswoc, removing any dependence on the precursor utilities. This also removes support for the original format, leaving YAML as the only valid format.
To integrate
Errata, I needed to move the diagnostic levels to plugin accessible header file. I am unwilling to create additional circular dependencies by making fundamental libraries (such as "tscpp/util") dependent on higher level libraries ("Diags"). One of the changes inErratabetween the old and libswoc versions is this ability to adaptErratato local error severities.There was a bit of cleanup in libswoc for this, which is currently mixed in. Before this becomes a ready PR, I will cut a new release of libswoc and merge that in.
The IPAllow config was changed to use a
MemArenabecause I think overall it's easier. The use ofstd::vectormeant the records couldn't be directly stored during parsing, because a re-allocation of the vector would scrozzle the pointers, but I didn't want to separately allocate all of them.MemArenameans these can be cheaply allocated and stored as parsed without a funky fix up later. At that point there's a bit of additional work to put all of the config data in the arena so there is no cleanup.I got tired of dealing with optional pairs of addresses (IPv4 and/or IPv6) and added some classes to deal with that more cleanly. That could be split out in to a separate PR.
See this libswoc PR.