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

Netlink: MPLS routes in kernel

Anyway, Bird is now capable to insert both MPLS routes and MPLS encap
routes into kernel.

It was (among others) needed to define platform-specific AF_MPLS to 28
as this constant has been assigned in the linux kernel.

No support for BSD now, it may be added in the future.
This commit is contained in:
Jan Moskyto Matejka
2016-03-04 12:55:50 +01:00
parent f2010f9c65
commit d14f8c3c45
10 changed files with 274 additions and 30 deletions

View File

@@ -259,6 +259,14 @@ static inline ip_addr net_prefix(const net_addr *a)
}
}
static inline u32 net_mpls(const net_addr *a)
{
if (a->type == NET_MPLS)
return ((net_addr_mpls *) a)->label;
bug("Can't call net_mpls on non-mpls net_addr");
}
static inline uint net4_pxlen(const net_addr *a)
{ return a->pxlen; }