From dfe0a507fca2792f1dab614d494f9e7df1e0b76a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Walstr=C3=B6m?= Date: Mon, 20 May 2024 10:56:34 +0200 Subject: [PATCH] confd: Always use model prefix for intentityrefs This is a hardened requirement i latest libyang(/sysrepo) --- src/confd/src/cni.c | 8 ++++---- src/confd/src/ietf-routing.c | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/confd/src/cni.c b/src/confd/src/cni.c index 8636b8e6..ffe1fa90 100644 --- a/src/confd/src/cni.c +++ b/src/confd/src/cni.c @@ -368,15 +368,15 @@ static int iface_gen_cni(const char *ifname, struct lyd_node *cif) const char *iftype = lydx_get_cattr(cif, "type"); if (iftype && !strcmp(iftype, "infix-if-type:bridge")) - type = "bridge"; + type = "infix-interfaces:bridge"; else - type = "host"; + type = "infix-interfaces:host"; } - if (!strcmp(type, "host")) + if (!strcmp(type, "infix-interfaces:host")) return cni_host(net, ifname) ?: 1; - if (!strcmp(type, "bridge")) + if (!strcmp(type, "infix-interfaces:bridge")) return cni_bridge(net, ifname) ?: 1; ERROR("Unknown container network type %s, skipping.", type); diff --git a/src/confd/src/ietf-routing.c b/src/confd/src/ietf-routing.c index 4b5b7edb..586651b6 100644 --- a/src/confd/src/ietf-routing.c +++ b/src/confd/src/ietf-routing.c @@ -104,13 +104,14 @@ int parse_ospf_areas(sr_session_ctx_t *session, struct lyd_node *areas, FILE *fp area_type = lydx_get_cattr(area, "area-type"); default_cost = lydx_get_cattr(area, "default-cost"); summary = lydx_get_bool(area, "summary"); + if (area_type) { int stub_or_nssa = 0; - if (!strcmp(area_type, "nssa-area")) { + if (!strcmp(area_type, "ietf-ospf:nssa-area")) { stub_or_nssa = 1; fprintf(fp, " area %s nssa %s\n", area_id, !summary ? "no-summary" : ""); - } else if (!strcmp(area_type, "stub-area")) { + } else if (!strcmp(area_type, "ietf-ospf:stub-area")) { stub_or_nssa = 1; fprintf(fp, " area %s stub %s\n", area_id, !summary ? "no-summary" : ""); } @@ -358,7 +359,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, "static")) { + if (!strcmp(type, "ietf-routing:static")) { staticd_enabled = parse_static_routes(session, lydx_get_child(cplane, "static-routes"), fp); } else if (!strcmp(type, "ietf-ospf:ospfv2")) { parse_ospf(session, lydx_get_child(cplane, "ospf"));