diff options
author | G. Paul Ziemba <paulz@labn.net> | 2023-08-13 22:55:06 +0200 |
---|---|---|
committer | G. Paul Ziemba <paulz@labn.net> | 2023-08-16 16:08:49 +0200 |
commit | d04cf8052556340946a2c48ddc5a4c85db468503 (patch) | |
tree | 4f2bcb66b686988f5d70870275ee5ebae3114414 /pbrd | |
parent | Merge pull request #14181 from opensourcerouting/fix/bgpd_labeled_unicast_set... (diff) | |
download | frr-d04cf8052556340946a2c48ddc5a4c85db468503.tar.xz frr-d04cf8052556340946a2c48ddc5a4c85db468503.zip |
pbrd: add advisory flag PBR_ACTION_DROP
PBR configuration may specify "set nexthop blackhole" which,
for linux dataplanes, is implemented as a table with a blackhole
route.
Other dataplanes might implement this action as an explicit
packet-filtering "drop" action instead of a route. This new flag
PBR_ACTION_DROP is now set when a rule has "set nexthop blackhole"
as an aid to other dataplanes.
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
Diffstat (limited to 'pbrd')
-rw-r--r-- | pbrd/pbr_vty.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pbrd/pbr_vty.c b/pbrd/pbr_vty.c index 0d6e1afd5..d0c20c80c 100644 --- a/pbrd/pbr_vty.c +++ b/pbrd/pbr_vty.c @@ -1105,6 +1105,9 @@ static void pbrms_clear_set_config(struct pbr_map_sequence *pbrms) pbrms->nhs_installed = false; pbrms->forwarding_type = PBR_FT_UNSPEC; + + /* clear advisory flag indicating nexthop == blackhole */ + UNSET_FLAG(pbrms->action_bm, PBR_ACTION_DROP); } @@ -1263,6 +1266,8 @@ DEFPY (pbr_map_nexthop, } } else if (bh) { nhop.type = NEXTHOP_TYPE_BLACKHOLE; + /* advisory flag for non-linux dataplanes */ + SET_FLAG(pbrms->action_bm, PBR_ACTION_DROP); } else { nhop.type = NEXTHOP_TYPE_IFINDEX; } |