diff options
-rw-r--r-- | ssh.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh.c,v 1.519 2020/02/07 03:54:44 dtucker Exp $ */ | 1 | /* $OpenBSD: ssh.c,v 1.520 2020/02/18 08:49:49 dtucker Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -1208,6 +1208,14 @@ main(int ac, char **av) | |||
1208 | if (options.jump_host != NULL) { | 1208 | if (options.jump_host != NULL) { |
1209 | char port_s[8]; | 1209 | char port_s[8]; |
1210 | const char *sshbin = argv0; | 1210 | const char *sshbin = argv0; |
1211 | int port = options.port, jumpport = options.jump_port; | ||
1212 | |||
1213 | if (port <= 0) | ||
1214 | port = default_ssh_port(); | ||
1215 | if (jumpport <= 0) | ||
1216 | jumpport = default_ssh_port(); | ||
1217 | if (strcmp(options.jump_host, host) == 0 && port == jumpport) | ||
1218 | fatal("jumphost loop via %s", options.jump_host); | ||
1211 | 1219 | ||
1212 | /* | 1220 | /* |
1213 | * Try to use SSH indicated by argv[0], but fall back to | 1221 | * Try to use SSH indicated by argv[0], but fall back to |