Refurbish IPAllow with libswoc. #9193
Merged
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.