]> git.proxmox.com Git - pve-container.git/commit
fix invalid device passthrough being added to config
authorFilip Schauer <f.schauer@proxmox.com>
Tue, 16 Apr 2024 09:27:17 +0000 (11:27 +0200)
committerFiona Ebner <f.ebner@proxmox.com>
Tue, 16 Apr 2024 10:10:52 +0000 (12:10 +0200)
commit556ddd393165d51653fe32c1f8fe8628d1802219
treed02fa17892e5fdf435f102b98894a9d0d66d9160
parent5dfa868bc7a956fc18d92237f66708e0f4130f10
fix invalid device passthrough being added to config

Fix a bug that allows a device passthrough entry to be added to the
config despite the device path not pointing to a device. Previously,
adding an invalid device passthrough entry would throw an error, but the
entry would still be added to the config. This is fixed by moving the
respective checks from update_lxc_config to update_pct_config, which is
run before the entry is written to the config file.

Signed-off-by: Filip Schauer <f.schauer@proxmox.com>
[FE: drop hunk for use statements left-over from earlier version]
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
src/PVE/LXC.pm
src/PVE/LXC/Config.pm
src/PVE/LXC/Tools.pm