This repository has been archived on 2025-03-20. You can view files and clone it, but cannot push or open issues or pull requests.
sonic-buildimage/src/sonic-frr/patch/0005-Support-VRF.patch
pavel-shirshov ce2ecf2680
[frr]: Update frr version to 7.1 (#3575)
* Build 7.1 without patches

* Port patches
2019-10-08 07:30:27 -07:00

31 lines
1.0 KiB
Diff

From b7ae4e11c2dc14f9208b62ea060bb5ecbf4cddb2 Mon Sep 17 00:00:00 2001
From: Pavel Shirshov <pavelsh@microsoft.com>
Date: Mon, 7 Oct 2019 17:17:54 -0700
Subject: [PATCH 1/1] Support VRF
---
zebra/zebra_fpm_netlink.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/zebra/zebra_fpm_netlink.c b/zebra/zebra_fpm_netlink.c
index 88f0c3250..29f07f801 100644
--- a/zebra/zebra_fpm_netlink.c
+++ b/zebra/zebra_fpm_netlink.c
@@ -327,7 +327,12 @@ static int netlink_route_info_encode(netlink_route_info_t *ri, char *in_buf,
req->n.nlmsg_flags = NLM_F_CREATE | NLM_F_REQUEST;
req->n.nlmsg_type = ri->nlmsg_type;
req->r.rtm_family = ri->af;
- req->r.rtm_table = ri->rtm_table;
+ if (ri->rtm_table < 256)
+ req->r.rtm_table = ri->rtm_table;
+ else {
+ req->r.rtm_table = RT_TABLE_COMPAT;
+ addattr32(&req->n, in_buf_len, RTA_TABLE, ri->rtm_table);
+ }
req->r.rtm_dst_len = ri->prefix->prefixlen;
req->r.rtm_protocol = ri->rtm_protocol;
req->r.rtm_scope = RT_SCOPE_UNIVERSE;
--
2.17.1.windows.2