diff options
Diffstat (limited to 'zebra/zebra_mpls.h')
| -rw-r--r-- | zebra/zebra_mpls.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/zebra/zebra_mpls.h b/zebra/zebra_mpls.h index c8df8670f4..51279798a4 100644 --- a/zebra/zebra_mpls.h +++ b/zebra/zebra_mpls.h @@ -408,10 +408,16 @@ void zebra_mpls_vty_init(void); */ static inline u_char lsp_distance(enum lsp_types_t type) { - if (type == ZEBRA_LSP_STATIC) + switch (type) { + case ZEBRA_LSP_STATIC: return (route_distance(ZEBRA_ROUTE_STATIC)); - - return 150; + case ZEBRA_LSP_LDP: + return (route_distance(ZEBRA_ROUTE_LDP)); + case ZEBRA_LSP_BGP: + return (route_distance(ZEBRA_ROUTE_BGP)); + default: + return 150; + } } /* |
