aboutgitcodebugslistschat
path: root/isolation.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2022-09-12 22:24:04 +1000
committerStefano Brivio <sbrivio@redhat.com>2022-09-13 05:31:51 +0200
commite8b19a4bd2eed33b1497482ffd693785c73ebaeb (patch)
tree951e71964c7796f98372ea0ec6518033bb112efb /isolation.c
parentd72a1e7bb96b461eb47d921436f7fe344e7b268a (diff)
downloadpasst-e8b19a4bd2eed33b1497482ffd693785c73ebaeb.tar
passt-e8b19a4bd2eed33b1497482ffd693785c73ebaeb.tar.gz
passt-e8b19a4bd2eed33b1497482ffd693785c73ebaeb.tar.bz2
passt-e8b19a4bd2eed33b1497482ffd693785c73ebaeb.tar.lz
passt-e8b19a4bd2eed33b1497482ffd693785c73ebaeb.tar.xz
passt-e8b19a4bd2eed33b1497482ffd693785c73ebaeb.tar.zst
passt-e8b19a4bd2eed33b1497482ffd693785c73ebaeb.zip
Consolidate validation of pasta namespace options
There are a number of different ways to specify namespaces for pasta to use. Some combinations are valid and some are not. Currently validation for these is spread across several places: conf_ns_pid() validates PID options specifically. Near its callsite in conf() several other checks are made. Some additional checks are made in conf_ns_open() and finally theres a check just before the call to pasta_start_ns(). This is quite hard to follow. Make it easier by putting all the validation logic together in a new conf_pasta_ns() function, which subsumes conf_ns_pid(). This reveals that some of the checks were redundant with each other, so remove those. For good measure, rename conf_netns() to conf_netns_opt() to make it clearer its handling just the --netns option specifically, not overall configuration of the netns. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'isolation.c')
0 files changed, 0 insertions, 0 deletions