summaryrefslogtreecommitdiff
path: root/sysdep/unix
diff options
context:
space:
mode:
authorJan Moskyto Matejka <mq@ucw.cz>2016-03-04 12:55:50 +0100
committerJan Moskyto Matejka <mq@ucw.cz>2016-12-22 21:38:33 +0100
commitd14f8c3c45f7e33a7e54ebc0d45bdb0295d70301 (patch)
treee7dadc1408d852a36075efc64a9bdb15630efdd4 /sysdep/unix
parentf2010f9c65ca69584c34c762fb3e5e957958478e (diff)
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.
Diffstat (limited to 'sysdep/unix')
-rw-r--r--sysdep/unix/krt.c5
1 files changed, 3 insertions, 2 deletions
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,