diff options
author | Olivier Dugeon <olivier.dugeon@orange.com> | 2018-01-18 19:11:11 +0100 |
---|---|---|
committer | Olivier Dugeon <olivier.dugeon@orange.com> | 2018-01-18 19:11:11 +0100 |
commit | cf9b9f77f638923f5a44fdd14ce2725631ffa526 (patch) | |
tree | 70b0b5c8181c23a4fd8faf5750e80083a422c728 /zebra | |
parent | Merge pull request #1626 from LabNConsulting/working/master/vnc-config (diff) | |
download | frr-cf9b9f77f638923f5a44fdd14ce2725631ffa526.tar.xz frr-cf9b9f77f638923f5a44fdd14ce2725631ffa526.zip |
OSPFD: Add Experimental Segment Routing support
This is an implementation of draft-ietf-ospf-segment-routing-extensions-24
and RFC7684 for Extended Link & Prefix Opaque LSA.
Look to doc/OSPF_SR.rst for implementation details & known limitations.
New files:
- ospfd/ospf_sr.h: Segment Routing structure definition (SubTLVs + SRDB)
- ospfd/ospf_sr.c: Main functions for Segment Routing support
- ospfd/ospf_ext.h: TLVs and SubTLVs definition for RFC7684
- ospfd/ospf_ext.c: RFC7684 Extended Link / Prefix implementation
- doc/OSPF-SRr.rst: Documentation
Modified Files:
- doc/ospfd.texi: Add new Segment Routing CLI command definition
- lib/command.h: Add new string command for Segment Routing CLI
- lib/mpls.h: Add default value for SRGB
- lib/route_types.txt: Add new OSPF Segment Routing route type
- ospfd/ospf_dump.[c,h]: Add OSPF SR debug
- ospfd/ospf_memory.[c,h]: Add new Segment Routing memory type
- ospfd/ospf_opaque.[c,h]: Add ospf_sr_init() starting function
- ospfd/ospf_ri.c: Add new functions to Set/Get Segment Routing TLVs
Add new ospf_router_info_lsa_upadte() to send Opaque LSA to ospf_sr.c()
- ospfd/ospf_ri.h: Add new Router Information SR SubTLVs
- ospfd/ospf_spf.c: Add new scheduler when running SPF to trigger
update of NHLFE
- ospfd/ospfd.h: Add new thread for Segment Routing scheduler
- ospfd/subdir.am: Add new files
- vtysh/Makefile.am: Add new ospf_sr.c file for vtysh
- zebra/kernel_netlink.c: Add new OSPF_SR route type
- zebra/rt_netlink.[c,h]: Add new OSPF_SR route type
- zebra/zebra_mpls.h: Add new OSPF_SR route type
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/kernel_netlink.c | 1 | ||||
-rw-r--r-- | zebra/rt_netlink.c | 6 | ||||
-rw-r--r-- | zebra/rt_netlink.h | 1 | ||||
-rw-r--r-- | zebra/zebra_mpls.h | 10 |
4 files changed, 17 insertions, 1 deletions
diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c index 1be2cbcaf..d794c4c64 100644 --- a/zebra/kernel_netlink.c +++ b/zebra/kernel_netlink.c @@ -102,6 +102,7 @@ static const struct message rtproto_str[] = { {RTPROT_MROUTED, "mroute"}, {RTPROT_BGP, "BGP"}, {RTPROT_OSPF, "OSPF"}, + {RTPROT_OSPF_SR, "OSPF-SR"}, {RTPROT_ISIS, "IS-IS"}, {RTPROT_RIP, "RIP"}, {RTPROT_RIPNG, "RIPNG"}, diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index a77814668..bb034b893 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -98,7 +98,8 @@ static inline int is_selfroute(int proto) || (proto == RTPROT_ISIS) || (proto == RTPROT_RIPNG) || (proto == RTPROT_NHRP) || (proto == RTPROT_EIGRP) || (proto == RTPROT_LDP) || (proto == RTPROT_BABEL) - || (proto == RTPROT_RIP) || (proto == RTPROT_SHARP)) { + || (proto == RTPROT_RIP) || (proto == RTPROT_SHARP) + || (proto == RTPROT_OSPF_SR)) { return 1; } @@ -118,6 +119,9 @@ static inline int zebra2proto(int proto) case ZEBRA_ROUTE_OSPF6: proto = RTPROT_OSPF; break; + case ZEBRA_ROUTE_OSPF_SR: + proto = RTPROT_OSPF_SR; + break; case ZEBRA_ROUTE_STATIC: proto = RTPROT_STATIC; break; diff --git a/zebra/rt_netlink.h b/zebra/rt_netlink.h index 51350fd6f..79d5e14a6 100644 --- a/zebra/rt_netlink.h +++ b/zebra/rt_netlink.h @@ -52,6 +52,7 @@ #define RTPROT_EIGRP 192 #define RTPROT_LDP 193 #define RTPROT_SHARP 194 +#define RTPROT_OSPF_SR 195 void rt_netlink_init(void); diff --git a/zebra/zebra_mpls.h b/zebra/zebra_mpls.h index 22c771c34..93e1162b6 100644 --- a/zebra/zebra_mpls.h +++ b/zebra/zebra_mpls.h @@ -316,6 +316,12 @@ void mpls_ldp_lsp_uninstall_all(struct hash_backet *backet, void *ctxt); */ void mpls_ldp_ftn_uninstall_all(struct zebra_vrf *zvrf, int afi); +/* + * Uninstall all Segment Routing NHLFEs for a particular LSP forwarding entry. + * If no other NHLFEs exist, the entry would be deleted. + */ +void mpls_sr_lsp_uninstall_all(struct hash_backet *backet, void *ctxt); + #if defined(HAVE_CUMULUS) /* * Check that the label values used in LSP creation are consistent. The @@ -448,6 +454,8 @@ static inline int re_type_from_lsp_type(enum lsp_types_t lsp_type) return ZEBRA_ROUTE_LDP; case ZEBRA_LSP_BGP: return ZEBRA_ROUTE_BGP; + case ZEBRA_LSP_SR: + return ZEBRA_ROUTE_OSPF_SR; case ZEBRA_LSP_NONE: default: return ZEBRA_ROUTE_KERNEL; @@ -464,6 +472,8 @@ static inline const char *nhlfe_type2str(enum lsp_types_t lsp_type) return "LDP"; case ZEBRA_LSP_BGP: return "BGP"; + case ZEBRA_LSP_SR: + return "SR"; default: return "Unknown"; } |