summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEvgeny Vereshchagin <evvers@ya.ru>2016-03-17 21:06:17 +0000
committerEvgeny Vereshchagin <evvers@ya.ru>2016-03-17 21:07:11 +0000
commit1c1ea217357c60ab2f57ea8f20d84166f641f49f (patch)
treea8231f5175a4951cc5c2674cb65a747223e8f14c /src
parent2ddbdcc9c24b802564784f0812611b368a733e51 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/nspawn/nspawn.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index be07625a03..eb89916b7e 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -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;