Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cfgutils: proper check for return code looking up routing block in ro…
…ute_exists() - when the route block doesn't exist, route_lookup() returns -1, which was used to access routing actions due to condition expecting 0 on not found. The fix should avoid crashing by accessing invalid addresses. Reported by Alex Balashov - fixed return codes in the configuration file to follow the rules with positive being evaluated to true and negative to false - route_exists() returns the code returned by running actions, like a classic sub-route execution
- Loading branch information
Showing
1 changed file
with
17 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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