1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

BSD: Explicitly dropping routes with mismatched AF's.

This commit is contained in:
Jan Moskyto Matejka
2016-01-21 10:59:52 +01:00
parent 0e965f6991
commit 3f35816136
2 changed files with 24 additions and 8 deletions

View File

@@ -183,6 +183,8 @@ fib_rehash(struct fib *f, int step)
static u32
fib_hash(struct fib *f, const net_addr *a)
{
ASSERT(f->addr_type == a->type);
switch (f->addr_type)
{
case NET_IP4: return FIB_HASH(f, a, ip4);
@@ -232,6 +234,8 @@ fib_find(struct fib *f, const net_addr *a)
static void
fib_insert(struct fib *f, const net_addr *a, struct fib_node *e)
{
ASSERT(f->addr_type == a->type);
switch (f->addr_type)
{
case NET_IP4: FIB_INSERT(f, a, e, ip4); return;