From 5b885bf70848908c7fed07c8efba18ea316379d4 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 16 Nov 2010 03:47:07 +0100 Subject: BGP: Allow receiving multicast routes --- nest/rt-table.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'nest/rt-table.c') 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); -- cgit v1.2.3