summaryrefslogtreecommitdiffstats
path: root/staticd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-06-24 16:46:24 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2019-06-24 16:46:24 +0200
commit2962897782d558242e6143ef367520bd30934a7d (patch)
tree571a6618dbf438b0c74988076356f249755c3812 /staticd
parentzebra: Fix rnh old -vs- new comparison (diff)
downloadfrr-2962897782d558242e6143ef367520bd30934a7d.tar.xz
frr-2962897782d558242e6143ef367520bd30934a7d.zip
staticd: If we are told a nexthop has changed reinstall the route.
If we are told that a dependant nexthop has changed, just reinstall the route. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'staticd')
-rw-r--r--staticd/static_nht.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/staticd/static_nht.c b/staticd/static_nht.c
index 9af30a587..2aa0db59f 100644
--- a/staticd/static_nht.c
+++ b/staticd/static_nht.c
@@ -37,8 +37,6 @@ static void static_nht_update_safi(struct prefix *p, uint32_t nh_num,
struct static_route *si;
struct static_vrf *svrf;
struct route_node *rn;
- bool orig;
- bool reinstall;
svrf = vrf->info;
if (!svrf)
@@ -49,7 +47,6 @@ static void static_nht_update_safi(struct prefix *p, uint32_t nh_num,
return;
for (rn = route_top(stable); rn; rn = route_next(rn)) {
- reinstall = false;
for (si = rn->info; si; si = si->next) {
if (si->nh_vrf_id != nh_vrf_id)
continue;
@@ -60,7 +57,6 @@ static void static_nht_update_safi(struct prefix *p, uint32_t nh_num,
&& si->type != STATIC_IPV6_GATEWAY_IFNAME)
continue;
- orig = si->nh_valid;
if (p->family == AF_INET
&& p->u.prefix4.s_addr == si->addr.ipv4.s_addr)
si->nh_valid = !!nh_num;
@@ -69,14 +65,7 @@ static void static_nht_update_safi(struct prefix *p, uint32_t nh_num,
&& memcmp(&p->u.prefix6, &si->addr.ipv6, 16) == 0)
si->nh_valid = !!nh_num;
- if (orig != si->nh_valid)
- reinstall = true;
-
- if (reinstall) {
- static_zebra_route_add(rn, si, vrf->vrf_id,
- safi, true);
- reinstall = false;
- }
+ static_zebra_route_add(rn, si, vrf->vrf_id, safi, true);
}
}
}