]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: Continue rm update if table not found
authorStephen Worley <sworley@cumulusnetworks.com>
Thu, 16 May 2019 21:34:05 +0000 (14:34 -0700)
committerStephen Worley <sworley@cumulusnetworks.com>
Fri, 17 May 2019 00:24:42 +0000 (17:24 -0700)
Add a check for after table lookup during route map update.
If the table ID does not exist, continue.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
zebra/redistribute.c

index f3155deb146cfdccb3f905a9be708cae37bf538e..b13f1170cd5defa3dc53c1d32b0b3d327b81961b 100644 (file)
@@ -770,6 +770,13 @@ void zebra_import_table_rm_update(const char *rmap)
                                continue;
                        table = zebra_vrf_table_with_table_id(afi, SAFI_UNICAST,
                                                              i, VRF_DEFAULT);
+                       if (!table) {
+                               if (IS_ZEBRA_DEBUG_RIB_DETAILED)
+                                       zlog_debug("%s: Table id=%d not found",
+                                                  __func__, i);
+                               continue;
+                       }
+
                        for (rn = route_top(table); rn; rn = route_next(rn)) {
                                /* For each entry in the non-default
                                 * routing table,