summaryrefslogtreecommitdiff
path: root/sysdep/unix/krt.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2015-04-25 21:41:43 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2015-04-25 21:41:43 +0200
commit7069fc9e724134ddd841219f5673cc9b13c58490 (patch)
tree2777aae9072e192a7f788471648271d6af85282b /sysdep/unix/krt.c
parentc5ff44a703e4ab810a5bd45cf9140643a50fb3ec (diff)
KRT: Fixes route reload
Did not really worked
Diffstat (limited to 'sysdep/unix/krt.c')
-rw-r--r--sysdep/unix/krt.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c
index 7cec28c8..efdf4bdd 100644
--- a/sysdep/unix/krt.c
+++ b/sysdep/unix/krt.c
@@ -451,7 +451,7 @@ again:
*pbest = best->next;
best->next = n->routes;
n->routes = best;
- if (best != old_best || !(n->n.flags & KRF_INSTALLED))
+ if (best != old_best || !(n->n.flags & KRF_INSTALLED) || p->reload)
{
DBG("%I/%d: announcing (metric=%d)\n", n->n.prefix, n->n.pxlen, best->u.krt.metric);
krt_learn_announce_update(p, best);
@@ -461,6 +461,8 @@ again:
DBG("%I/%d: uptodate (metric=%d)\n", n->n.prefix, n->n.pxlen, best->u.krt.metric);
}
FIB_ITERATE_END(f);
+
+ p->reload = 0;
}
static void
@@ -1031,7 +1033,10 @@ krt_reload_routes(struct proto *P)
/* Although we keep learned routes in krt_table, we rather schedule a scan */
if (KRT_CF->learn)
+ {
+ p->reload = 1;
krt_scan_timer_kick(p);
+ }
return 1;
}