diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2010-11-16 03:47:07 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2010-11-16 03:47:07 +0100 |
commit | 5b885bf70848908c7fed07c8efba18ea316379d4 (patch) | |
tree | b4a94b0b5a49d2dd075a054270c386419c42900d /nest/rt-table.c | |
parent | e6eee664723aa0e1d87eac65216cdf12636e3284 (diff) | |
download | bird-5b885bf70848908c7fed07c8efba18ea316379d4.tar bird-5b885bf70848908c7fed07c8efba18ea316379d4.zip |
BGP: Allow receiving multicast routes
Diffstat (limited to 'nest/rt-table.c')
-rw-r--r-- | nest/rt-table.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c index 1303843..2ebd114 100644 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@ -78,11 +78,22 @@ net_route(rtable *tab, ip_addr a, int len, int cast) } static void -rte_init(struct fib_node *N) +rte_init_unicast(struct fib_node *N) { net *n = (net *) N; N->flags = 0; + n->cast = RTC_UNICAST; + n->routes = NULL; +} + +static void +rte_init_multicast(struct fib_node *N) +{ + net *n = (net *) N; + + N->flags = 0; + n->cast = RTC_MULTICAST; n->routes = NULL; } @@ -867,8 +878,8 @@ void rt_setup(pool *p, rtable *t, char *name, struct rtable_config *cf) { bzero(t, sizeof(*t)); - fib_init(&t->fib_unicast, p, sizeof(net), 0, rte_init); - fib_init(&t->fib_multicast, p, sizeof(net), 0, rte_init); + fib_init(&t->fib_unicast, p, sizeof(net), 0, rte_init_unicast); + fib_init(&t->fib_multicast, p, sizeof(net), 0, rte_init_multicast); t->name = name; t->config = cf; init_list(&t->hooks); |