aboutgitcodebugslistschat
path: root/conf.c
diff options
context:
space:
mode:
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/conf.c b/conf.c
index 3c38ceb..629eb89 100644
--- a/conf.c
+++ b/conf.c
@@ -132,6 +132,11 @@ static void conf_ports(const struct ctx *c, char optname, const char *optarg,
return;
}
+ if ((optname == 't' || optname == 'T') && c->no_tcp)
+ die("TCP port forwarding requested but TCP is disabled");
+ if ((optname == 'u' || optname == 'U') && c->no_udp)
+ die("UDP port forwarding requested but UDP is disabled");
+
if (!strcmp(optarg, "auto")) {
if (fwd->mode)
goto mode_conflict;