When modifying a route, only allow one of RTF_<BLACKHOLE,REJECT,GATEWAY> to be configured.
Submitted by: Neel Chauhan <neel AT neelc DOT org>
Differential D25595
When modifying a route, only allow one of RTF_<BLACKHOLE,REJECT,GATEWAY> to be configured nc on Jul 8 2020, 9:18 PM. Authored by Tags Referenced Files
Details
When modifying a route, only allow one of RTF_<BLACKHOLE,REJECT,GATEWAY> to be configured. Submitted by: Neel Chauhan <neel AT neelc DOT org>
Diff Detail
Event Timeline
Comment Actions Here's the updated code, reduced to a single bitwise operator. Sorry for the delay, I had a lot of things going on at $DAYJOB.
Comment Actions I added tests, they all pass. The new behavior is that only one of RTF_<BLACKHOLE,REJECT,GATEWAY> can be configured when adding a route as well. Previously, this was only for modifying a route.
Comment Actions With errors upon running rc.d, I realized that we should only do this when modifying. |