summaryrefslogtreecommitdiff
path: root/nest
diff options
context:
space:
mode:
authorPavel Tvrdík <pawel.tvrdik@gmail.com>2016-01-07 18:17:16 +0100
committerPavel Tvrdík <pawel.tvrdik@gmail.com>2016-01-07 18:21:31 +0100
commitde9b87f55863f29eb7965d8a772f8a34f195f4ac (patch)
tree727486aa3727b3ef6ecff2fa589fa6e910caeb38 /nest
parente691d16a63ce40bc56ecbc970e8118686d4b0148 (diff)
Add NET ROA4/6 structures
Diffstat (limited to 'nest')
-rw-r--r--nest/rt-fib.c8
-rw-r--r--nest/rt-table.c2
2 files changed, 10 insertions, 0 deletions
diff --git a/nest/rt-fib.c b/nest/rt-fib.c
index a47ece08..8bf67f8d 100644
--- a/nest/rt-fib.c
+++ b/nest/rt-fib.c
@@ -189,6 +189,8 @@ fib_hash(struct fib *f, const net_addr *a)
case NET_IP6: return FIB_HASH(f, a, ip6);
case NET_VPN4: return FIB_HASH(f, a, vpn4);
case NET_VPN6: return FIB_HASH(f, a, vpn6);
+ case NET_ROA4: return FIB_HASH(f, a, roa4);
+ case NET_ROA6: return FIB_HASH(f, a, roa6);
default: bug("invalid type");
}
}
@@ -212,6 +214,8 @@ fib_find(struct fib *f, const net_addr *a)
case NET_IP6: return FIB_FIND(f, a, ip6);
case NET_VPN4: return FIB_FIND(f, a, vpn4);
case NET_VPN6: return FIB_FIND(f, a, vpn6);
+ case NET_ROA4: return FIB_FIND(f, a, roa4);
+ case NET_ROA6: return FIB_FIND(f, a, roa6);
default: bug("invalid type");
}
}
@@ -225,6 +229,8 @@ fib_insert(struct fib *f, const net_addr *a, struct fib_node *e)
case NET_IP6: FIB_INSERT(f, a, e, ip6); return;
case NET_VPN4: FIB_INSERT(f, a, e, vpn4); return;
case NET_VPN6: FIB_INSERT(f, a, e, vpn6); return;
+ case NET_ROA4: FIB_INSERT(f, a, e, roa4); return;
+ case NET_ROA6: FIB_INSERT(f, a, e, roa6); return;
default: bug("invalid type");
}
}
@@ -314,10 +320,12 @@ fib_route(struct fib *f, const net_addr *n)
{
case NET_IP4:
case NET_VPN4:
+ case NET_ROA4:
return fib_route_ip4(f, (net_addr_ip4 *) n0);
case NET_IP6:
case NET_VPN6:
+ case NET_ROA6:
return fib_route_ip6(f, (net_addr_ip6 *) n0);
default:
diff --git a/nest/rt-table.c b/nest/rt-table.c
index 7c72aa4a..25362271 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -112,10 +112,12 @@ net_route(rtable *tab, const net_addr *n)
{
case NET_IP4:
case NET_VPN4:
+ case NET_ROA4:
return net_route_ip4(&tab->fib, (net_addr_ip4 *) n0);
case NET_IP6:
case NET_VPN6:
+ case NET_ROA6:
return net_route_ip6(&tab->fib, (net_addr_ip6 *) n0);
default: