diff options
author | Jan Moskyto Matejka <mq@ucw.cz> | 2016-01-21 10:59:52 +0100 |
---|---|---|
committer | Jan Moskyto Matejka <mq@ucw.cz> | 2016-01-21 14:55:33 +0100 |
commit | 3f35816136f1b57067d5ce426b031e4e3583085c (patch) | |
tree | f49e70ed6c3e5db3c9bdd75aa3c26864eade9207 /nest/rt-fib.c | |
parent | 0e965f69914313857a95d03b2e6136d3e84019dd (diff) |
BSD: Explicitly dropping routes with mismatched AF's.
Diffstat (limited to 'nest/rt-fib.c')
-rw-r--r-- | nest/rt-fib.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nest/rt-fib.c b/nest/rt-fib.c index 55387c5e..8021ea24 100644 --- a/nest/rt-fib.c +++ b/nest/rt-fib.c @@ -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; |