mirror of
git://github.com/lxc/lxc
synced 2025-08-31 02:17:58 +00:00
Keep veth.pair.name on network shutdown
In case of a container that is rebooting, freeing veth.pair.name here results in losing given veth.pair name (Only if given lxc_netdev is reused). Signed-off-by: Torsten Fohrer <tfohrer@googlemail.com>
This commit is contained in:
@@ -3026,8 +3026,6 @@ bool lxc_delete_network(struct lxc_handler *handler)
|
|||||||
WARN("Failed to remove interface \"%s\" from host: %s.", hostveth, strerror(-ret));
|
WARN("Failed to remove interface \"%s\" from host: %s.", hostveth, strerror(-ret));
|
||||||
} else {
|
} else {
|
||||||
INFO("Removed interface \"%s\" from host.", hostveth);
|
INFO("Removed interface \"%s\" from host.", hostveth);
|
||||||
free(netdev->priv.veth_attr.pair);
|
|
||||||
netdev->priv.veth_attr.pair = NULL;
|
|
||||||
}
|
}
|
||||||
} else if (strlen(netdev->priv.veth_attr.veth1) > 0) {
|
} else if (strlen(netdev->priv.veth_attr.veth1) > 0) {
|
||||||
hostveth = netdev->priv.veth_attr.veth1;
|
hostveth = netdev->priv.veth_attr.veth1;
|
||||||
|
Reference in New Issue
Block a user