From 1bfee9368adcd91337b4b4b5ad22330678ed0e78 Mon Sep 17 00:00:00 2001 From: Igor Ryzhov Date: Tue, 5 Oct 2021 17:38:21 +0300 Subject: isisd: fix redistribute CLI Currently, it is possible to configure IPv6 protocols for IPv4 redistribution and vice versa in CLI. The YANG model doesn't allow this so the user receives the following error: ``` nfware(config-router)# redistribute ipv4 ospf6 level-1 % Failed to edit configuration. YANG error(s): Invalid enumeration value "ospf6". Invalid enumeration value "ospf6". Invalid enumeration value "ospf6". YANG path: Schema location /frr-isisd:isis/instance/redistribute/ipv4/protocol. ``` Let's make CLI more user-friendly and allow only supported protocols in redistribution commands. Signed-off-by: Igor Ryzhov --- isisd/isisd.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'isisd/isisd.h') diff --git a/isisd/isisd.h b/isisd/isisd.h index 64fbf78a0..13f3475b7 100644 --- a/isisd/isisd.h +++ b/isisd/isisd.h @@ -46,7 +46,11 @@ static const bool fabricd = true; #define PROTO_NAME "openfabric" #define PROTO_HELP "OpenFabric routing protocol\n" #define PROTO_REDIST_STR FRR_REDIST_STR_FABRICD +#define PROTO_IP_REDIST_STR FRR_IP_REDIST_STR_FABRICD +#define PROTO_IP6_REDIST_STR FRR_IP6_REDIST_STR_FABRICD #define PROTO_REDIST_HELP FRR_REDIST_HELP_STR_FABRICD +#define PROTO_IP_REDIST_HELP FRR_IP_REDIST_HELP_STR_FABRICD +#define PROTO_IP6_REDIST_HELP FRR_IP6_REDIST_HELP_STR_FABRICD #define ROUTER_NODE OPENFABRIC_NODE #else static const bool fabricd = false; @@ -54,7 +58,11 @@ static const bool fabricd = false; #define PROTO_NAME "isis" #define PROTO_HELP "IS-IS routing protocol\n" #define PROTO_REDIST_STR FRR_REDIST_STR_ISISD +#define PROTO_IP_REDIST_STR FRR_IP_REDIST_STR_ISISD +#define PROTO_IP6_REDIST_STR FRR_IP6_REDIST_STR_ISISD #define PROTO_REDIST_HELP FRR_REDIST_HELP_STR_ISISD +#define PROTO_IP_REDIST_HELP FRR_IP_REDIST_HELP_STR_ISISD +#define PROTO_IP6_REDIST_HELP FRR_IP6_REDIST_HELP_STR_ISISD #define ROUTER_NODE ISIS_NODE extern void isis_cli_init(void); #endif -- cgit v1.2.3