Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
String matching: Fix long postfix string match
Postfix matching is done by reversing all the postfixes and storing them in a LPM TRIE map, and then reversing the string to match on and looking it up in the map. If the string to match is longer than the postfix max length then the string would not be matched, leading to long strings not being subject to the match logic. This commit modifies the look up to handle strings longer than the postfix max length. It fixes the length to copy to the postfix max length and supplies an offset from where to start copying. The offset is calculated as the difference between the original length and the capped length. Signed-off-by: Kevin Sheldrake <[email protected]>
- Loading branch information