mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-29 20:23:01 +02:00
confd: Always use model prefix for intentityrefs
This is a hardened requirement i latest libyang(/sysrepo)
This commit is contained in:
committed by
Tobias Waldekranz
parent
05f063d81b
commit
dfe0a507fc
+4
-4
@@ -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);
|
||||
|
||||
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user