diff options
author | Russ White <russ@riw.us> | 2023-08-22 18:16:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-22 18:16:01 +0200 |
commit | 58ade1ba5d1fb5b5b6565ba7552993493d93e395 (patch) | |
tree | 8846cee0f2685e62389497711dd5dd7385ae9dc8 | |
parent | Merge pull request #14214 from opensourcerouting/fix/handle_rfc7606_attr_len_... (diff) | |
parent | pbrd: add advisory flag PBR_ACTION_DROP (diff) | |
download | frr-58ade1ba5d1fb5b5b6565ba7552993493d93e395.tar.xz frr-58ade1ba5d1fb5b5b6565ba7552993493d93e395.zip |
Merge pull request #14217 from LabNConsulting/ziemba-pbr-action-drop
pbrd: add advisory flag PBR_ACTION_DROP
-rw-r--r-- | lib/pbr.h | 1 | ||||
-rw-r--r-- | pbrd/pbr_vty.c | 5 |
2 files changed, 6 insertions, 0 deletions
@@ -99,6 +99,7 @@ struct pbr_action { #define PBR_ACTION_DST_PORT (1 << 8) #define PBR_ACTION_DSCP (1 << 9) #define PBR_ACTION_ECN (1 << 10) +#define PBR_ACTION_DROP (1 << 11) /* nexthop == blackhole */ uint32_t table; uint32_t queue_id; diff --git a/pbrd/pbr_vty.c b/pbrd/pbr_vty.c index 1f1e42218..6d31fd75a 100644 --- a/pbrd/pbr_vty.c +++ b/pbrd/pbr_vty.c @@ -1118,6 +1118,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); } @@ -1276,6 +1279,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; } |