summaryrefslogtreecommitdiffstats
path: root/sysdep/unix/krt.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1999-03-04 20:00:31 +0100
committerMartin Mares <mj@ucw.cz>1999-03-04 20:00:31 +0100
commit111213f0b66cff8f562f7d9117c9080a9882129e (patch)
tree9f4f8057d91364cea141bf325b526e102ab8364e /sysdep/unix/krt.c
parente16155ae4aaee5d9ba7b6940f8312b36707718e4 (diff)
downloadbird-111213f0b66cff8f562f7d9117c9080a9882129e.tar
bird-111213f0b66cff8f562f7d9117c9080a9882129e.zip
Fixed processing of !krt_capable() routes. Converted device route decisions
to the krt_capable mechanism as well.
Diffstat (limited to 'sysdep/unix/krt.c')
-rw-r--r--sysdep/unix/krt.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c
index aa875cc..9ad4237 100644
--- a/sysdep/unix/krt.c
+++ b/sysdep/unix/krt.c
@@ -88,12 +88,11 @@ krt_got_route(struct krt_proto *p, rte *e)
return;
}
- old = net->routes;
- if (old && !krt_capable(old))
- old = NULL;
- if (old)
+ if (old = net->routes)
{
- if (krt_uptodate(e, net->routes))
+ if (!krt_capable(old))
+ verdict = krt_capable(e) ? KRF_DELETE : KRF_SEEN;
+ else if (krt_uptodate(e, net->routes))
verdict = KRF_SEEN;
else
verdict = KRF_UPDATE;
@@ -156,7 +155,7 @@ krt_prune(struct krt_proto *p)
DBG("krt_prune: removing inherited %I/%d\n", n->n.prefix, n->n.pxlen);
rte_update(n, pp, NULL);
}
- else
+ else if (krt_capable(new))
{
DBG("krt_prune: reinstalling %I/%d\n", n->n.prefix, n->n.pxlen);
krt_set_notify(pp, n, new, NULL);