summaryrefslogtreecommitdiffstats
path: root/sysdep
diff options
context:
space:
mode:
Diffstat (limited to 'sysdep')
-rw-r--r--sysdep/unix/krt.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c
index 562dc71..6785161 100644
--- a/sysdep/unix/krt.c
+++ b/sysdep/unix/krt.c
@@ -324,7 +324,7 @@ krt_learn_scan(struct krt_proto *p, rte *e)
static void
krt_learn_prune(struct krt_proto *p)
{
- struct fib *fib = &p->krt_table.fib;
+ struct fib *fib = rt_fib(&p->krt_table, RTC_UNICAST);
struct fib_iterator fit;
KRT_TRACE(p, D_EVENTS, "Pruning inherited routes");
@@ -502,7 +502,7 @@ krt_flush_routes(struct krt_proto *p)
struct rtable *t = p->p.table;
KRT_TRACE(p, D_EVENTS, "Flushing kernel routes");
- FIB_WALK(&t->fib, f)
+ FIB_WALK(rt_fib(t, RTC_UNICAST), f)
{
net *n = (net *) f;
rte *e = n->routes;
@@ -616,7 +616,7 @@ krt_prune(struct krt_proto *p)
struct rtable *t = p->p.table;
KRT_TRACE(p, D_EVENTS, "Pruning table %s", t->name);
- FIB_WALK(&t->fib, f)
+ FIB_WALK(rt_fib(t, RTC_UNICAST), f)
{
net *n = (net *) f;
int verdict = f->flags & KRF_VERDICT_MASK;
@@ -743,6 +743,9 @@ krt_import_control(struct proto *P, rte **new, ea_list **attrs, struct linpool *
if (e->attrs->proto == P)
return -1;
+ if (e->attrs->cast != RTC_UNICAST)
+ return -1;
+
if (!KRT_CF->devroutes &&
(e->attrs->dest == RTD_DEVICE) &&
(e->attrs->source != RTS_STATIC_DEVICE))