]> git.baikalelectronics.ru Git - kernel.git/commit
mpls: Basic support for adding and removing routes
authorEric W. Biederman <ebiederm@xmission.com>
Wed, 4 Mar 2015 01:12:40 +0000 (19:12 -0600)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Mar 2015 05:26:06 +0000 (00:26 -0500)
commitf7c79cb2af994191a66650ab75cdb9a1304aaa85
tree3e27a41694e69fef7edc45647cb80cd96742de65
parent220b00e671fb48a671a07c2204f1e6e1e3c17532
mpls: Basic support for adding and removing routes

mpls_route_add and mpls_route_del implement the basic logic for adding
and removing Next Hop Label Forwarding Entries from the MPLS input
label map.  The addition and subtraction is done in a way that is
consistent with how the existing routing table in Linux are
maintained.  Thus all of the work to deal with NLM_F_APPEND,
NLM_F_EXCL, NLM_F_REPLACE, and NLM_F_CREATE.

Cases that are not clearly defined such as changing the interpretation
of the mpls reserved labels is not allowed.

Because it seems like the right thing to do adding an MPLS route without
specifying an input label and allowing the kernel to pick a free label
table entry is supported.   The implementation is currently less than optimal
but that can be changed.

As I don't have anything else to test with only ethernet and the loopback
device are the only two device types currently supported for forwarding
MPLS over.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mpls/af_mpls.c