diff --git a/src/sonic-frr/Makefile b/src/sonic-frr/Makefile index 0d68706a8977..1e1e198e42d7 100644 --- a/src/sonic-frr/Makefile +++ b/src/sonic-frr/Makefile @@ -12,6 +12,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : patch -p1 < ../patch/0002-Reduce-severity-of-Vty-connected-from-message.patch patch -p1 < ../patch/0003-ignore-nexthop-attribute-when-NLRI-is-present.patch patch -p1 < ../patch/0004-Allow-BGP-attr-NEXT_HOP-to-be-0.0.0.0-due-to-allevia.patch + patch -p1 < ../patch/0005-Support-VRF.patch tools/tarsource.sh -V -e '-sonic' dpkg-buildpackage -rfakeroot -b -us -uc -Ppkg.frr.nortrlib -j$(SONIC_CONFIG_MAKE_JOBS) popd diff --git a/src/sonic-frr/patch/0005-Support-VRF.patch b/src/sonic-frr/patch/0005-Support-VRF.patch new file mode 100644 index 000000000000..c6de0e5ecf0e --- /dev/null +++ b/src/sonic-frr/patch/0005-Support-VRF.patch @@ -0,0 +1,30 @@ +From 81990d9aafdfd459c0caa6cf07501fa628ada454 Mon Sep 17 00:00:00 2001 +From: Tyler Li +Date: Mon, 3 Jun 2019 01:48:11 -0700 +Subject: [PATCH] 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 207cbc099..b98c6886b 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.11.0 + diff --git a/src/sonic-frr/patch/series b/src/sonic-frr/patch/series index 05df330b9bae..4033e555fe7f 100644 --- a/src/sonic-frr/patch/series +++ b/src/sonic-frr/patch/series @@ -2,3 +2,4 @@ 0002-Reduce-severity-of-Vty-connected-from-message.patch 0003-ignore-nexthop-attribute-when-NLRI-is-present.patch 0004-Allow-BGP-attr-NEXT_HOP-to-be-0.0.0.0-due-to-allevia.patch +0005-Support-VRF.patch