]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: Redistribution should be told about the old route
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 1 Aug 2019 23:09:59 +0000 (19:09 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 1 Aug 2019 23:09:59 +0000 (19:09 -0400)
When we are sending a redistribute_update, pass the old_re in
so that if we still have it around we can update the calling protocol.

Test:

router ospf
  redistribute sharp
!

sharp install route 4.5.6.7 nexthop 192.168.201.1 1

Now add a `ip route 4.5.6.7/32 192.168.201.1`.
This causes zebra to replace the sharp route with the static route.
No update is sent to ospf and debug:
2019/08/01 19:02:38.271998 ZEBRA: 0:4.5.6.7/32: Redist update re 0x12fdbda0 (static), old 0x0 (None)

With fix:

2019/08/01 19:15:09.644499 ZEBRA: 0:4.5.6.7/32: Redist update re 0x1ba5bce0 (static), old 0x1beea4e0 (sharp)
2019/08/01 19:15:09.645462 OSPF: ospf_zebra_read_route: from client sharp: vrf_id 0, p 4.5.6.7/32

Ticket: CM-25847
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
zebra/zebra_rib.c

index ca19971d6470cce108dca2a890cb65ed534504f1..f3721c478d4ab6efb9a26a9def85b5106e285eb5 100644 (file)
@@ -1774,7 +1774,7 @@ static void rib_process_result(struct zebra_dplane_ctx *ctx)
 
                                /* Redistribute */
                                redistribute_update(dest_pfx, src_pfx,
-                                                   re, NULL);
+                                                   re, old_re);
                        }
 
                        /*