summaryrefslogtreecommitdiff
path: root/usr.bin/tftp
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-09-24 20:19:49 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-09-24 20:19:49 +0000
commit780100eac9fc276c871e2aeb620c35216687819d (patch)
tree8149b2133f7a6e32ab1082844aa955a275ef9c9b /usr.bin/tftp
parent4c128c08a4a5a6a3fce86b266c2d1c235267789f (diff)
fix automatic connection which is supposed to be done in put command;
found by jmc, fixed by me
Diffstat (limited to 'usr.bin/tftp')
-rw-r--r--usr.bin/tftp/main.c5
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) {