diff options
author | Chad Wang <imflinter@gmail.com> | 2018-03-15 14:06:42 -0400 |
---|---|---|
committer | Chad Wang <imflinter@gmail.com> | 2018-04-04 10:26:45 -0400 |
commit | 2ab698c963b12219aecf72d001ae28c173548933 (patch) | |
tree | f271ebd670c242c3cde7157d0861fc2503feff2c /netlink/librtnl/mapper.c | |
parent | 042a782c530ceb58507d697726e68ad7fe4fe023 (diff) |
Add support for MPLS labels in router plugin
1. Fixed more formatting issues. Added ASSERT.
2. Added MPLS features to support iproute2 command like
ip -f mpls route add <label> dev vpp0
ip route add <IP> encap mpls <LABELS> via <IP> dev vpp0
3. Modifications to compile with the latest VPP.
Change-Id: I5ed55ec3c6484beb1377496e9c763bb55da7ee26
Signed-off-by: Chad Wang <imflinter@gmail.com>
Diffstat (limited to 'netlink/librtnl/mapper.c')
-rw-r--r-- | netlink/librtnl/mapper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/netlink/librtnl/mapper.c b/netlink/librtnl/mapper.c index 65cc13a..05b7f1d 100644 --- a/netlink/librtnl/mapper.c +++ b/netlink/librtnl/mapper.c @@ -97,7 +97,7 @@ int mapper_add_del_route(mapper_ns_t *ns, ns_route_t *route, int del) FIB_ENTRY_FLAG_NONE, prefix.fp_proto, &nh, map->sw_if_index, ns->v6fib_index, 0 /* weight */, - (mpls_label_t *) MPLS_LABEL_INVALID, + (fib_mpls_label_t *) MPLS_LABEL_INVALID, FIB_ROUTE_PATH_FLAG_NONE); #endif /* FIB_VERSION == 1 */ } else { @@ -128,7 +128,7 @@ int mapper_add_del_route(mapper_ns_t *ns, ns_route_t *route, int del) FIB_ENTRY_FLAG_NONE, prefix.fp_proto, &nh, map->sw_if_index, ns->v4fib_index, 0 /* weight */, - (mpls_label_t *) MPLS_LABEL_INVALID, + (fib_mpls_label_t *) MPLS_LABEL_INVALID, FIB_ROUTE_PATH_FLAG_NONE); #endif /* FIB_VERSION == 1 */ } |