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:
@@ -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; }
|
||||
|
||||
|
Reference in New Issue
Block a user