summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2023-10-09 20:07:12 +0200
committerGitHub <noreply@github.com>2023-10-09 20:07:12 +0200
commit556fdaa69df535226c0498c70a1a6add833c71fa (patch)
tree548b71dd0a8ba9ed96473da801d6980985b56458
parentMerge pull request #14543 from mjstapp/fix_pbr_rule_unique (diff)
parentlib,*: add vrf id to pbr rule results zapi message (diff)
downloadfrr-556fdaa69df535226c0498c70a1a6add833c71fa.tar.xz
frr-556fdaa69df535226c0498c70a1a6add833c71fa.zip
Merge pull request #14533 from mjstapp/fix_rule_notify_vrf
lib,*: add vrf id to pbr rule results zapi message
-rw-r--r--zebra/zapi_msg.c4
-rw-r--r--zebra/zebra_dplane.c7
-rw-r--r--zebra/zebra_dplane.h2
3 files changed, 12 insertions, 1 deletions
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c
index 859687b98..b73511f02 100644
--- a/zebra/zapi_msg.c
+++ b/zebra/zapi_msg.c
@@ -828,7 +828,9 @@ void zsend_rule_notify_owner(const struct zebra_dplane_ctx *ctx,
s = stream_new(ZEBRA_MAX_PACKET_SIZ);
- zclient_create_header(s, ZEBRA_RULE_NOTIFY_OWNER, VRF_DEFAULT);
+ zclient_create_header(s, ZEBRA_RULE_NOTIFY_OWNER,
+ dplane_ctx_rule_get_vrfid(ctx));
+
stream_put(s, &note, sizeof(note));
stream_putl(s, dplane_ctx_rule_get_seq(ctx));
stream_putl(s, dplane_ctx_rule_get_priority(ctx));
diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c
index 03d7bb88a..099a6e272 100644
--- a/zebra/zebra_dplane.c
+++ b/zebra/zebra_dplane.c
@@ -3031,6 +3031,13 @@ void dplane_ctx_rule_set_dp_flow_ptr(struct zebra_dplane_ctx *ctx,
ctx->u.rule.new.dp_flow_ptr = dp_flow_ptr;
}
+vrf_id_t dplane_ctx_rule_get_vrfid(const struct zebra_dplane_ctx *ctx)
+{
+ DPLANE_CTX_VALID(ctx);
+
+ return ctx->u.rule.new.prule.vrf_id;
+}
+
/***********************************************************************
* PBR RULE ACCESSORS - end
**********************************************************************/
diff --git a/zebra/zebra_dplane.h b/zebra/zebra_dplane.h
index 4d4a17bba..87c2e0365 100644
--- a/zebra/zebra_dplane.h
+++ b/zebra/zebra_dplane.h
@@ -740,6 +740,8 @@ intptr_t
dplane_ctx_rule_get_old_dp_flow_ptr(const struct zebra_dplane_ctx *ctx);
void dplane_ctx_rule_set_dp_flow_ptr(struct zebra_dplane_ctx *ctx,
intptr_t dp_flow_ptr);
+vrf_id_t dplane_ctx_rule_get_vrfid(const struct zebra_dplane_ctx *ctx);
+
/* Accessors for policy based routing iptable information */
struct zebra_pbr_iptable;
void dplane_ctx_get_pbr_iptable(const struct zebra_dplane_ctx *ctx,