Blackholes not replaced #190
Open
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.
add_nexthop_routes()and oradd_openvpn_routes()will not remove the blackhole added byadd_blackhole_routes()because the blackhole is added viadefault(0.0.0.0/0) but replaced using0.0.0.0/1, and128.0.0.0/1.I also noted a problem in
run_rule_watcher()- I think.... its trying to remove the startup blackholes. But these routes are not the ones added byadd_blackhole_routes- also, its not removing them from the${ROUTE_TABLE}- so this basically doesn't do anything. Additionally, there is a another method for removing blackhole routesdelete_blackhole_routeswhich seems like it ought to work, for anytype of blackhole route - using 0.0.0.0/0 or 0.0.0.0/1, 128.0.0.1.This change fixes the problem with not removing blackholes, but please review the logic in the rule watcher - maybe I'm missing something?