From d14f8c3c45f7e33a7e54ebc0d45bdb0295d70301 Mon Sep 17 00:00:00 2001 From: Jan Moskyto Matejka Date: Fri, 4 Mar 2016 12:55:50 +0100 Subject: 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. --- sysdep/unix/krt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sysdep/unix/krt.c') diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c index 9f66d2f4..c273cb10 100644 --- a/sysdep/unix/krt.c +++ b/sysdep/unix/krt.c @@ -1153,7 +1153,8 @@ krt_start(struct proto *P) { case NET_IP4: p->af = AF_INET; break; case NET_IP6: p->af = AF_INET6; break; - default: ASSERT(0); + case NET_MPLS: p->af = AF_MPLS; break; + default: log(L_ERR "KRT: Tried to start with strange net type: %d", p->p.net_type); return PS_START; break; } add_tail(&krt_proto_list, &p->krt_node); @@ -1264,7 +1265,7 @@ struct protocol proto_unix_kernel = { .template = "kernel%d", .attr_class = EAP_KRT, .preference = DEF_PREF_INHERITED, - .channel_mask = NB_IP, + .channel_mask = NB_IP | NB_MPLS, .proto_size = sizeof(struct krt_proto), .config_size = sizeof(struct krt_config), .preconfig = krt_preconfig, -- cgit v1.2.3