]> git.ipfire.org Git - thirdparty/systemd.git/commit
nspawn: correctly parse a list of interfaces
authorFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 18 May 2023 10:54:15 +0000 (12:54 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 18 May 2023 14:50:24 +0000 (16:50 +0200)
commit8f4d843afc450573b4fa8cf4b122d43915698d76
tree6c9f2c199daed24049b8cd0bd7518d8ecdea3d2a
parent28ed232639b294b00f67e1731695f7573b485433
nspawn: correctly parse a list of interfaces

Interface=/MACVLAN=/IPVLAN= nspawn options take a _list_ of interface
names - this was recently enhanced by 2f091b1b49 to support interface
pairs. Unfortunately, this also introduced a regression where we don't
parse the list as a list, but just as a single value. For example,
having `Interface=sd-shared1 sd-shared2` in an nspawn config file would
throw:

systemd-nspawn[898]: Network interface, interface name not valid: sd-shared1 sd-shared2
systemd-nspawn[898]: /run/systemd/nspawn/testsuite-13.nspawn-settings.1po.nspawn:41: Failed to parse file: Invalid argument

Follow-up to 2f091b1b49.
src/nspawn/nspawn-network.c