diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-03-22 15:00:07 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-03-22 18:16:49 +0100 |
commit | 1e37e35c3ea88672c677ea7ac63fe0b9df609b0c (patch) | |
tree | 8400d1b28ae6d4d0146ad1573c7ebd3653152ace /nest/route.h | |
parent | ead7b8f498ddefc0b7373cbba78f9a7ba1dddaa9 (diff) |
BGP: Support for MPLS labels and VPN SAFI
Basic support for SAFI 4 and 128 (MPLS labeled IP and VPN) for IPv4 and
IPv6. Should work for route reflector, but does not properly handle
originating routes with next hop self.
Based on patches from Jan Matejka.
Diffstat (limited to 'nest/route.h')
-rw-r--r-- | nest/route.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/nest/route.h b/nest/route.h index 546b04c4..d7d4df69 100644 --- a/nest/route.h +++ b/nest/route.h @@ -551,7 +551,15 @@ static inline rta * rta_cow(rta *r, linpool *lp) { return rta_is_cached(r) ? rta void rta_dump(rta *); void rta_dump_all(void); void rta_show(struct cli *, rta *, ea_list *); -void rta_set_recursive_next_hop(rtable *dep, rta *a, rtable *tab, ip_addr gw, ip_addr ll, mpls_label_stack *mls); + +struct hostentry * rt_get_hostentry(rtable *tab, ip_addr a, ip_addr ll, rtable *dep); +void rta_apply_hostentry(rta *a, struct hostentry *he, mpls_label_stack *mls); + +static inline void +rta_set_recursive_next_hop(rtable *dep, rta *a, rtable *tab, ip_addr gw, ip_addr ll, mpls_label_stack *mls) +{ + rta_apply_hostentry(a, rt_get_hostentry(tab, gw, ll, dep), mls); +} /* * rta_set_recursive_next_hop() acquires hostentry from hostcache and fills |