mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-10-19 16:27:16 +00:00
Merge pull request #410 from dslicenc/rdnbrd-vrr
zebra: fix attempt to install a second rib from imported table entries
This commit is contained in:
commit
fdb33a50e1
@ -498,6 +498,7 @@ int
|
|||||||
zebra_add_import_table_entry (struct route_node *rn, struct rib *rib, const char *rmap_name)
|
zebra_add_import_table_entry (struct route_node *rn, struct rib *rib, const char *rmap_name)
|
||||||
{
|
{
|
||||||
struct rib *newrib;
|
struct rib *newrib;
|
||||||
|
struct rib *same;
|
||||||
struct prefix p;
|
struct prefix p;
|
||||||
struct nexthop *nhop;
|
struct nexthop *nhop;
|
||||||
union g_addr *gate;
|
union g_addr *gate;
|
||||||
@ -515,6 +516,21 @@ zebra_add_import_table_entry (struct route_node *rn, struct rib *rib, const char
|
|||||||
p.prefixlen = rn->p.prefixlen;
|
p.prefixlen = rn->p.prefixlen;
|
||||||
p.u.prefix4 = rn->p.u.prefix4;
|
p.u.prefix4 = rn->p.u.prefix4;
|
||||||
|
|
||||||
|
RNODE_FOREACH_RIB (rn, same)
|
||||||
|
{
|
||||||
|
if (CHECK_FLAG (same->status, RIB_ENTRY_REMOVED))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (same->type == rib->type && same->instance == rib->instance
|
||||||
|
&& same->table == rib->table
|
||||||
|
&& same->type != ZEBRA_ROUTE_CONNECT)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (same)
|
||||||
|
zebra_del_import_table_entry (rn, same);
|
||||||
|
|
||||||
|
|
||||||
if (rib->nexthop_num == 1)
|
if (rib->nexthop_num == 1)
|
||||||
{
|
{
|
||||||
nhop = rib->nexthop;
|
nhop = rib->nexthop;
|
||||||
|
Loading…
Reference in New Issue
Block a user