diff options
| author | Mark Stapp <mjs@voltanet.io> | 2018-10-17 15:54:53 -0400 |
|---|---|---|
| committer | Mark Stapp <mjs@voltanet.io> | 2019-01-22 12:02:20 -0500 |
| commit | d4cb23d7bcb876f6022dd7fe65265a38ed0ddcda (patch) | |
| tree | d2fa23c03156125985b74f9712c1fd2169642370 /zebra/zebra_mpls.c | |
| parent | 0f461727abb78335f9c14833749a968ca2ca204a (diff) | |
zebra: add apis to add and delete NHLFEs
Add public versions of zebra apis that add NHLFEs to an LSP,
and that free NHLFEs. The dataplane code needs to capture/copy
NHLFEs in order to do async LSP programming.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'zebra/zebra_mpls.c')
| -rw-r--r-- | zebra/zebra_mpls.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c index c0764cd4b8..db2fcae5b7 100644 --- a/zebra/zebra_mpls.c +++ b/zebra/zebra_mpls.c @@ -1808,6 +1808,29 @@ int zebra_mpls_lsp_uninstall(struct zebra_vrf *zvrf, struct route_node *rn, } /* + * Add an NHLFE to an LSP, return the newly-added object + */ +zebra_nhlfe_t *zebra_mpls_lsp_add_nhlfe(zebra_lsp_t *lsp, + enum lsp_types_t lsp_type, + enum nexthop_types_t gtype, + union g_addr *gate, + ifindex_t ifindex, + mpls_label_t out_label) +{ + /* Just a public pass-through to the internal implementation */ + return nhlfe_add(lsp, lsp_type, gtype, gate, ifindex, out_label); +} + +/* + * Free an allocated NHLFE + */ +void zebra_mpls_nhlfe_del(zebra_nhlfe_t *nhlfe) +{ + /* Just a pass-through to the internal implementation */ + nhlfe_del(nhlfe); +} + +/* * Registration from a client for the label binding for a FEC. If a binding * already exists, it is informed to the client. * NOTE: If there is a manually configured label binding, that is used. |
