confd: add support for host containers, shares host's interfaces

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2024-02-25 19:49:27 +01:00
parent ffd2128614
commit b04c81199d
2 changed files with 6 additions and 2 deletions
+3
View File
@@ -69,6 +69,9 @@ static int add(const char *name, struct lyd_node *cif)
}
}
if (lydx_is_enabled(cif, "host-network"))
fprintf(fp, " host");
fprintf(fp, "\n");
fchmod(fileno(fp), 0700);
fclose(fp);
@@ -87,15 +87,16 @@ module infix-containers {
choice network {
description "Select network mode: none, host, or container network interfaces.";
case host {
case host-network {
leaf host {
description "Run as host container, with full access to all network interfaces.";
description "Run in same network namespace as host.";
type boolean;
}
}
case network {
list network {
description "Container network interface to connect to the container.";
key name;
leaf name {