Skip to content

Commit

Permalink
[zebra] ignore route from default table (#12019)
Browse files Browse the repository at this point in the history
Signed-off-by: Ying Xie <[email protected]>

Signed-off-by: Ying Xie <[email protected]>
  • Loading branch information
yxieca authored Sep 8, 2022
1 parent 834f6d7 commit 7dabf30
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/sonic-frr/patch/0009-ignore-route-from-default-table.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From bb3b003840959adf5b5be52e91bc798007c9857a Mon Sep 17 00:00:00 2001
From: Ying Xie <[email protected]>
Date: Thu, 8 Sep 2022 04:20:36 +0000
Subject: [PATCH] From 776a29e8ab32c1364ee601a8730aabb773b0c86b Mon Sep 17
00:00:00 2001 Subject: [PATCH] ignore route from default table

Signed-off-by: Ying Xie <[email protected]>
---
zebra/zebra_fpm_netlink.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/zebra/zebra_fpm_netlink.c b/zebra/zebra_fpm_netlink.c
index 34be9fb39..d6c875a7e 100644
--- a/zebra/zebra_fpm_netlink.c
+++ b/zebra/zebra_fpm_netlink.c
@@ -283,6 +283,11 @@ static int netlink_route_info_fill(struct netlink_route_info *ri, int cmd,
rib_table_info(rib_dest_table(dest));
struct zebra_vrf *zvrf = table_info->zvrf;

+ if (table_info->table_id == RT_TABLE_DEFAULT) {
+ zfpm_debug("%s: Discard default table route", __func__);
+ return 0;
+ }
+
memset(ri, 0, sizeof(*ri));

ri->prefix = rib_dest_prefix(dest);
--
2.17.1

1 change: 1 addition & 0 deletions src/sonic-frr/patch/series
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
0007-Add-support-of-bgp-l3vni-evpn.patch
0008-Link-local-scope-was-not-set-while-binding-socket-for-bgp-ipv6-link-local-neighbors.patch
Disable-ipv6-src-address-test-in-pceplib.patch
0009-ignore-route-from-default-table.patch

0 comments on commit 7dabf30

Please sign in to comment.