summaryrefslogtreecommitdiffstats
path: root/staticd/static_nht.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-06-22 03:55:38 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-07-29 18:43:23 +0200
commit8bc8de2c155f33e1af273ed53dbf47c948a5c56e (patch)
tree0d4d599c230efeb89853ad36f4fde04919ac3131 /staticd/static_nht.c
parentlib, zebra: Allow protocols to use Distance as part of RR semantics (diff)
downloadfrr-8bc8de2c155f33e1af273ed53dbf47c948a5c56e.tar.xz
frr-8bc8de2c155f33e1af273ed53dbf47c948a5c56e.zip
staticd: Allow daemon to have backup static routes
Modify staticd to allow it to have backup static routes with higher admin distance. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'staticd/static_nht.c')
-rw-r--r--staticd/static_nht.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/staticd/static_nht.c b/staticd/static_nht.c
index aea175b19..f9f937f90 100644
--- a/staticd/static_nht.c
+++ b/staticd/static_nht.c
@@ -70,8 +70,12 @@ void static_nht_update(struct prefix *p, uint32_t nh_num,
if (orig != si->nh_valid)
reinstall = true;
+
+ if (reinstall) {
+ static_zebra_route_add(rn, si, vrf_id,
+ SAFI_UNICAST, true);
+ reinstall = false;
+ }
}
- if (reinstall)
- static_zebra_route_add(rn, vrf_id, SAFI_UNICAST, true);
}
}