diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2010-11-14 05:49:56 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2010-11-14 05:49:56 +0100 |
commit | 2ef9177a47e7137dd09b06a353a6e5f6e671c951 (patch) | |
tree | 3fb8f3e25eec4dd513cb87399caf7c0e6ff5f955 /sysdep | |
parent | 9d35f8c51f1062ddd8e2f41cf535d8a8d69ec6be (diff) | |
download | bird-2ef9177a47e7137dd09b06a353a6e5f6e671c951.tar bird-2ef9177a47e7137dd09b06a353a6e5f6e671c951.zip |
Add multicast support to static protocol and generic route handling.
Diffstat (limited to 'sysdep')
-rw-r--r-- | sysdep/unix/krt.c | 9 |
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)) |