nspawn: don't run nspawn --port=... without libiptc support

We get
$ systemd-nspawn --image /dev/loop1 --port 8080:80 -n -b 3
--port= is not supported, compiled without libiptc support.

instead of a ping-nc-iptables debugging session
This commit is contained in:
Evgeny Vereshchagin 2016-03-17 21:06:17 +00:00
parent 2ddbdcc9c2
commit 1c1ea21735
1 changed files with 7 additions and 0 deletions

View File

@ -977,6 +977,13 @@ static int verify_arguments(void) {
return -EINVAL;
}
#ifndef HAVE_LIBIPTC
if (arg_expose_ports) {
log_error("--port= is not supported, compiled without libiptc support.");
return -EOPNOTSUPP;
}
#endif
if (arg_start_mode == START_BOOT && arg_kill_signal <= 0)
arg_kill_signal = SIGRTMIN+3;