diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-12-12 00:05:49 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-12-12 00:05:49 +0100 |
commit | 66acbc8d7f80ce3c197549922b60fca093129047 (patch) | |
tree | d4cd38f5b8c2b1fcc4fd31020b43871a453345dc /nest | |
parent | fa5c09a2e708ed505ca140531b98e695fdaf989c (diff) |
Revive FIB and kernel MPLS code
Diffstat (limited to 'nest')
-rw-r--r-- | nest/config.Y | 1 | ||||
-rw-r--r-- | nest/rt-fib.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/nest/config.Y b/nest/config.Y index 432dd9c7..5c4f2393 100644 --- a/nest/config.Y +++ b/nest/config.Y @@ -140,6 +140,7 @@ net_type: | ROA6 { $$ = NET_ROA6; } | FLOW4{ $$ = NET_FLOW4; } | FLOW6{ $$ = NET_FLOW6; } + | MPLS { $$ = NET_MPLS; } ; CF_ENUM(T_ENUM_NETTYPE, NET_, IP4, IP6, VPN4, VPN6, ROA4, ROA6, FLOW4, FLOW6) diff --git a/nest/rt-fib.c b/nest/rt-fib.c index 45f47261..60c3da55 100644 --- a/nest/rt-fib.c +++ b/nest/rt-fib.c @@ -213,6 +213,7 @@ fib_hash(struct fib *f, const net_addr *a) case NET_ROA6: return FIB_HASH(f, a, roa6); case NET_FLOW4: return FIB_HASH(f, a, flow4); case NET_FLOW6: return FIB_HASH(f, a, flow6); + case NET_MPLS: return FIB_HASH(f, a, mpls); default: bug("invalid type"); } } @@ -249,6 +250,7 @@ fib_find(struct fib *f, const net_addr *a) case NET_ROA6: return FIB_FIND(f, a, roa6); case NET_FLOW4: return FIB_FIND(f, a, flow4); case NET_FLOW6: return FIB_FIND(f, a, flow6); + case NET_MPLS: return FIB_FIND(f, a, mpls); default: bug("invalid type"); } } @@ -268,6 +270,7 @@ fib_insert(struct fib *f, const net_addr *a, struct fib_node *e) case NET_ROA6: FIB_INSERT(f, a, e, roa6); return; case NET_FLOW4: FIB_INSERT(f, a, e, flow4); return; case NET_FLOW6: FIB_INSERT(f, a, e, flow6); return; + case NET_MPLS: FIB_INSERT(f, a, e, mpls); return; default: bug("invalid type"); } } |