forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated the patch to have fpm flag check
Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
- Loading branch information
Showing
1 changed file
with
28 additions
and
16 deletions.
There are no files selected for viewing
44 changes: 28 additions & 16 deletions
44
src/sonic-frr/patch/0053-Patch-to-send-tag-value-associated-with-route-via-ne.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,49 @@ | ||
From 1a8b3715a88aeaa4bda1ac445aa4992a14f33f31 Mon Sep 17 00:00:00 2001 | ||
From dd71a11ab9543622553a3835dac6513faa27b990 Mon Sep 17 00:00:00 2001 | ||
From: Abhishek Dosi <abdosi@microsoft.com> | ||
Date: Fri, 8 Nov 2024 02:19:37 +0000 | ||
Subject: [PATCH] Patch to send tag value associated with route via netlink in | ||
Date: Wed, 27 Nov 2024 02:45:50 +0000 | ||
Subject: [PATCH] Patch to send tag value associated with route via netlink in | ||
RTA_PRIORITY field. | ||
|
||
Signed-off-by: Abhishek Dosi <abdosi@microsoft.com> | ||
--- | ||
zebra/rt_netlink.c | 10 +++++++++- | ||
1 file changed, 9 insertions(+), 1 deletion(-) | ||
zebra/rt_netlink.c | 23 ++++++++++++++++++++--- | ||
1 file changed, 20 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c | ||
index 3f51894be..65f598aad 100644 | ||
index 3f51894be..33818c99b 100644 | ||
--- a/zebra/rt_netlink.c | ||
+++ b/zebra/rt_netlink.c | ||
@@ -2113,9 +2113,17 @@ ssize_t netlink_route_multipath_msg_encode(int cmd, | ||
@@ -2113,10 +2113,27 @@ ssize_t netlink_route_multipath_msg_encode(int cmd, | ||
* path(s) | ||
* by the routing protocol and for communicating with protocol peers. | ||
*/ | ||
+ | ||
+ /* Patch to send tag value as route attribute using RTA_PRIORITY | ||
+ * which can be used as metadata/attribute to take application specific | ||
+ * action. As seen in above comment this field is not use anyways and can be | ||
+ * use by fpmsyncd */ | ||
if (!nl_attr_put32(&req->n, datalen, RTA_PRIORITY, | ||
- if (!nl_attr_put32(&req->n, datalen, RTA_PRIORITY, | ||
- ROUTE_INSTALLATION_METRIC)) | ||
+ cmd == RTM_DELROUTE ? dplane_ctx_get_old_tag(ctx) : | ||
+ dplane_ctx_get_tag(ctx))) | ||
+ if (fpm) | ||
+ { | ||
+ /* Patch to send tag value as route attribute using RTA_PRIORITY | ||
+ * which can be used as metadata/attribute to take application specific | ||
+ * action. As seen in above comment this field is not use anyways and can be | ||
+ * use by fpmsyncd */ | ||
+ if (!nl_attr_put32(&req->n, datalen, RTA_PRIORITY, | ||
+ cmd == RTM_DELROUTE ? dplane_ctx_get_old_tag(ctx) : | ||
+ dplane_ctx_get_tag(ctx))) | ||
+ { | ||
return 0; | ||
- | ||
+ } | ||
+ } | ||
+ else | ||
+ { | ||
+ if (!nl_attr_put32(&req->n, datalen, RTA_PRIORITY, | ||
+ ROUTE_INSTALLATION_METRIC)) | ||
+ { | ||
+ return 0; | ||
+ } | ||
+ } | ||
|
||
#if defined(SUPPORT_REALMS) | ||
if (cmd == RTM_DELROUTE) | ||
tag = dplane_ctx_get_old_tag(ctx); | ||
-- | ||
2.25.1 | ||
|