diff options
author | Jan Moskyto Matejka <mq@ucw.cz> | 2015-12-11 15:35:37 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2015-12-19 15:57:09 +0100 |
commit | d7661fbe9dea980c61daa01a11a9aa59fa7be426 (patch) | |
tree | ba6c715e5b4cb1ba638dc5b75e14008a0e6f5e84 /nest/rt-table.c | |
parent | 9b136840d90cce887cd139054c3f0a7d8b9f57d2 (diff) |
Removed BITS_PER_IP_ADDRESS, MAX_PREFIX_LENGTH, BIRD_AF
Explicit setting of AF_INET(6|) in IP socket creation. BFD set to listen
on v6, without setting the V6ONLY flag to catch both v4 and v6 traffic.
Squashing and minor changes by Ondrej Santiago Zajicek
Diffstat (limited to 'nest/rt-table.c')
-rw-r--r-- | nest/rt-table.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c index 0a148f45..05073ce0 100644 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@ -2293,9 +2293,13 @@ rt_update_hostentry(rtable *tab, struct hostentry *he) he->igp_metric = rt_get_igp_metric(e); } + /* XXXX */ done: /* Add a prefix range to the trie */ - trie_add_prefix(tab->hostcache->trie, he->addr, MAX_PREFIX_LENGTH, pxlen, MAX_PREFIX_LENGTH); + if (ipa_is_ip4(he->addr)) + trie_add_prefix(tab->hostcache->trie, he->addr, IP4_MAX_PREFIX_LENGTH, pxlen, IP4_MAX_PREFIX_LENGTH); + else + trie_add_prefix(tab->hostcache->trie, he->addr, IP6_MAX_PREFIX_LENGTH, pxlen, IP6_MAX_PREFIX_LENGTH); rta_free(old_src); return old_src != he->src; @@ -2580,7 +2584,7 @@ rt_show(struct rt_show_data *d) if (d->filtered && (d->export_mode || d->primary_only)) cli_msg(0, ""); - if (d->pxlen == 256) + if (!d->prefix) { FIB_ITERATE_INIT(&d->fit, &d->table->fib); this_cli->cont = rt_show_cont; |