From 86557e447fd1ac492771a2553728351a6f82fcd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Walstr=C3=B6m?= Date: Mon, 4 Dec 2023 14:36:45 +0100 Subject: [PATCH] Routing: Fix regression when adding static routes Add autotest to regresssion suite to catch this --- src/confd/src/ietf-routing.c | 2 +- test/case/all.yaml | 3 +++ test/case/ietf_routing/all.yaml | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 test/case/ietf_routing/all.yaml diff --git a/src/confd/src/ietf-routing.c b/src/confd/src/ietf-routing.c index ea8ded32..0e3faa7d 100644 --- a/src/confd/src/ietf-routing.c +++ b/src/confd/src/ietf-routing.c @@ -141,7 +141,7 @@ static int change_control_plane_protocols(sr_session_ctx_t *session, uint32_t su const char *type; type = lydx_get_cattr(cplane, "type"); - if (!strcmp(type, "ietf-routing:static")) { + if (!strcmp(type, "static")) { staticd_enabled = parse_static_routes(session, lydx_get_child(cplane, "static-routes"), fp); } } diff --git a/test/case/all.yaml b/test/case/all.yaml index 74ef7c7b..73a9d30d 100644 --- a/test/case/all.yaml +++ b/test/case/all.yaml @@ -10,5 +10,8 @@ - name: infix-interfaces suite: infix_interfaces/all.yaml +- name: ietf-routing + suite: ietf_routing/all.yaml + #- name: infix-services # suite: infix_services/all.yaml diff --git a/test/case/ietf_routing/all.yaml b/test/case/ietf_routing/all.yaml new file mode 100644 index 00000000..078ed01c --- /dev/null +++ b/test/case/ietf_routing/all.yaml @@ -0,0 +1,2 @@ +--- +- case: static_routing.py