diff options
author | Jan Moskyto Matejka <mq@ucw.cz> | 2016-03-04 12:55:50 +0100 |
---|---|---|
committer | Jan Moskyto Matejka <mq@ucw.cz> | 2016-12-22 21:38:33 +0100 |
commit | d14f8c3c45f7e33a7e54ebc0d45bdb0295d70301 (patch) | |
tree | e7dadc1408d852a36075efc64a9bdb15630efdd4 /sysdep/unix/krt.c | |
parent | f2010f9c65ca69584c34c762fb3e5e957958478e (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/krt.c')
-rw-r--r-- | sysdep/unix/krt.c | 5 |
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, |