diff options
author | 2003-09-24 20:19:48 +0000 | |
---|---|---|
committer | 2003-09-24 20:19:48 +0000 | |
commit | 53b9b44b98c835758be76d54a910e8f1c603565e (patch) | |
tree | 05de2850d9a971b82309ceba8fd97471fdbc2bae /usr.bin/tftp/main.c | |
parent | Remove state setup no-ops. (diff) | |
download | wireguard-openbsd-53b9b44b98c835758be76d54a910e8f1c603565e.tar.xz wireguard-openbsd-53b9b44b98c835758be76d54a910e8f1c603565e.zip |
fix automatic connection which is supposed to be done in put command;
found by jmc, fixed by me
Diffstat (limited to 'usr.bin/tftp/main.c')
-rw-r--r-- | usr.bin/tftp/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/tftp/main.c b/usr.bin/tftp/main.c index 45f06c6fbf7..b512f7eba21 100644 --- a/usr.bin/tftp/main.c +++ b/usr.bin/tftp/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.16 2003/06/25 21:09:37 deraadt Exp $ */ +/* $OpenBSD: main.c,v 1.17 2003/09/24 20:19:48 deraadt Exp $ */ /* $NetBSD: main.c,v 1.6 1995/05/21 16:54:10 mycroft Exp $ */ /* @@ -40,7 +40,7 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93"; #endif -static const char rcsid[] = "$OpenBSD: main.c,v 1.16 2003/06/25 21:09:37 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: main.c,v 1.17 2003/09/24 20:19:48 deraadt Exp $"; #endif /* not lint */ /* Many bug fixes are from Jim Guyton <guyton@rand-unix> */ @@ -340,6 +340,7 @@ put(int argc, char *argv[]) bcopy(hp->h_addr, (caddr_t)&peeraddr.sin_addr, hp->h_length); peeraddr.sin_family = hp->h_addrtype; connected = 1; + port = sp->s_port; strlcpy(hostname, hp->h_name, sizeof hostname); } if (!connected) { |