forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path0003-Use-vrf_id-for-vrf-not-tabled_id.patch
More file actions
41 lines (37 loc) · 1.17 KB
/
0003-Use-vrf_id-for-vrf-not-tabled_id.patch
File metadata and controls
41 lines (37 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From e307d456ba0acae53af4b0690c3c0c81b87d51e2 Mon Sep 17 00:00:00 2001
From: Stepan Blyschak <stepanb@nvidia.com>
Date: Thu, 20 Oct 2022 11:03:14 +0000
Subject: [PATCH 03/15] Use vrf_id for vrf, not tabled_id
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
---
zebra/rt_netlink.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index 24c01b7f5..439b10eeb 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -1969,12 +1969,17 @@ ssize_t netlink_route_multipath_msg_encode(int cmd,
#endif
/* Table corresponding to this route. */
table_id = dplane_ctx_get_table(ctx);
- if (table_id < 256)
- req->r.rtm_table = table_id;
- else {
- req->r.rtm_table = RT_TABLE_UNSPEC;
- if (!nl_attr_put32(&req->n, datalen, RTA_TABLE, table_id))
- return 0;
+ if (!fpm) {
+ if (table_id < 256)
+ req->r.rtm_table = table_id;
+ else {
+ req->r.rtm_table = RT_TABLE_UNSPEC;
+ if (!nl_attr_put32(&req->n, datalen, RTA_TABLE, table_id))
+ return 0;
+ }
+ } else {
+ /* Put vrf if_index instead of table id */
+ req->r.rtm_table = dplane_ctx_get_vrf(ctx);
}
if (IS_ZEBRA_DEBUG_KERNEL)
--
2.30.2