changeset 1637:cf8dc6204fb6

support openssh long option -o Port=XXXX (#68)
author xcko <24556661+xcko@users.noreply.github.com>
date Wed, 20 Mar 2019 08:08:25 -0700
parents 35a1e8de3aec
children 315fcba6960e
files cli-runopts.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/cli-runopts.c	Wed Mar 20 16:05:37 2019 +0100
+++ b/cli-runopts.c	Wed Mar 20 08:08:25 2019 -0700
@@ -891,6 +891,7 @@
 #ifndef DISABLE_SYSLOG
 			"\tUseSyslog\n"
 #endif
+			"\tPort\n"
 		);
 		exit(EXIT_SUCCESS);
 	}
@@ -909,5 +910,10 @@
 	}
 #endif
 
+	if (match_extendedopt(&optstr, "Port") == DROPBEAR_SUCCESS) {
+		cli_opts.remoteport = optstr;
+		return;
+	}
+
 	dropbear_log(LOG_WARNING, "Ignoring unknown configuration option '%s'", origstr);
 }