]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: handle nht metric change correctly
authorAnuradha Karuppiah <anuradhak@cumulusnetworks.com>
Thu, 6 Feb 2020 17:30:58 +0000 (09:30 -0800)
committerAnuradha Karuppiah <anuradhak@cumulusnetworks.com>
Fri, 14 Feb 2020 17:18:30 +0000 (09:18 -0800)
PIM MLAG DF election API was not being triggered on cost change if the
upstream neighbor remained the same.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
pimd/pim_nht.c

index 5cb9492ec36ae2c8e68162bad175f16ef3237ab0..9efeeaee27ce979199be007e28f05c33d696c859 100644 (file)
@@ -561,6 +561,13 @@ static int pim_ecmp_nexthop_search(struct pim_instance *pim,
                                                        "%s: current nexthop does not have nbr ",
                                                        __PRETTY_FUNCTION__);
                                } else {
+                                       /* update metric even if the upstream
+                                        * neighbor stays unchanged
+                                        */
+                                       nexthop->mrib_metric_preference =
+                                               pnc->distance;
+                                       nexthop->mrib_route_metric =
+                                               pnc->metric;
                                        if (PIM_DEBUG_PIM_NHT) {
                                                char src_str[INET_ADDRSTRLEN];
                                                pim_inet4_dump("<addr?>",