mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-28 03:33:01 +02:00
confd: ensure we always return cni status
This patch fixes a runtime error triggered by modifying an interface currently used by a container. The CNI code must always return the CNI status (reserved for container or not). How to trigger: - Create veth pair - Make one end container-network and add to container - Leave - Return to configure and set an IP address on container interface - Leave - BOOM Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
committed by
Tobias Waldekranz
parent
8ea9dd2c55
commit
8ca2d74566
+2
-2
@@ -361,10 +361,10 @@ static int iface_gen_cni(const char *ifname, struct lyd_node *cif)
|
||||
}
|
||||
|
||||
if (!strcmp(type, "host"))
|
||||
return cni_host(net, ifname);
|
||||
return cni_host(net, ifname) ?: 1;
|
||||
|
||||
if (!strcmp(type, "bridge"))
|
||||
return cni_bridge(net, ifname);
|
||||
return cni_bridge(net, ifname) ?: 1;
|
||||
|
||||
ERROR("Unknown container network type %s, skipping.", type);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user