diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2019-08-08 14:08:36 -0300 | 
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2019-09-06 21:06:11 -0300 | 
| commit | 635a039eef1a57fae5ff979451814951d8fb3ac5 (patch) | |
| tree | 7c6d014461d428dfe0d669651fa6ad4e8bb05aae /zebra/zebra_mpls.h | |
| parent | e132dea0643499187cc51a332fd6616ee6df387c (diff) | |
lib, zebra: rename LSP type used for OSPF SR
SR support for IS-IS is coming so we need to be able to distinguish
OSPF and IS-IS LSPs.
While here, add missing case statement for LDP on
lsp_type_from_re_type().
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'zebra/zebra_mpls.h')
| -rw-r--r-- | zebra/zebra_mpls.h | 12 | 
1 files changed, 8 insertions, 4 deletions
diff --git a/zebra/zebra_mpls.h b/zebra/zebra_mpls.h index 506b51a536..1b2849f81c 100644 --- a/zebra/zebra_mpls.h +++ b/zebra/zebra_mpls.h @@ -426,7 +426,7 @@ static inline uint8_t lsp_distance(enum lsp_types_t type)  		return (route_distance(ZEBRA_ROUTE_BGP));  	case ZEBRA_LSP_NONE:  	case ZEBRA_LSP_SHARP: -	case ZEBRA_LSP_SR: +	case ZEBRA_LSP_OSPF_SR:  		return 150;  	} @@ -448,8 +448,12 @@ static inline enum lsp_types_t lsp_type_from_re_type(int re_type)  	switch (re_type) {  	case ZEBRA_ROUTE_STATIC:  		return ZEBRA_LSP_STATIC; +	case ZEBRA_ROUTE_LDP: +		return ZEBRA_LSP_LDP;  	case ZEBRA_ROUTE_BGP:  		return ZEBRA_LSP_BGP; +	case ZEBRA_ROUTE_OSPF: +		return ZEBRA_LSP_OSPF_SR;  	case ZEBRA_ROUTE_SHARP:  		return ZEBRA_LSP_SHARP;  	default: @@ -469,7 +473,7 @@ 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: +	case ZEBRA_LSP_OSPF_SR:  		return ZEBRA_ROUTE_OSPF;  	case ZEBRA_LSP_NONE:  		return ZEBRA_ROUTE_KERNEL; @@ -496,8 +500,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"; +	case ZEBRA_LSP_OSPF_SR: +		return "SR (OSPF)";  	case ZEBRA_LSP_SHARP:  		return "SHARP";  	case ZEBRA_LSP_NONE:  | 
