diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 1998-03-18 21:21:41 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 1998-03-18 21:21:41 +0000 |
commit | 7242f71ab019b2f2ee50d294bb0e7044f7dadddb (patch) | |
tree | 3528f4cb45b09337fb3d7c281fc045f60c2d8864 | |
parent | 00d308d9729a0eecca80ae53901baf453297c773 (diff) |
fix connecting to ip-numbers
-rw-r--r-- | usr.bin/telnet/commands.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/telnet/commands.c b/usr.bin/telnet/commands.c index 5b083e1564b..f3eb67cf990 100644 --- a/usr.bin/telnet/commands.c +++ b/usr.bin/telnet/commands.c @@ -1,4 +1,4 @@ -/* $OpenBSD: commands.c,v 1.11 1998/03/12 17:31:30 deraadt Exp $ */ +/* $OpenBSD: commands.c,v 1.12 1998/03/18 21:21:40 art Exp $ */ /* $NetBSD: commands.c,v 1.14 1996/03/24 22:03:48 jtk Exp $ */ /* @@ -2360,12 +2360,16 @@ tn(argc, argv) if(inet_pton(AF_INET6, hostp, &sin6.sin6_addr)) { sin6.sin6_family = family = AF_INET6; + sa = (struct sockaddr *)&sin6; + sa_size = sizeof(sin6); strcpy(_hostname, hostp); hostname =_hostname; } else #endif if(inet_aton(hostp, &sin.sin_addr)){ sin.sin_family = family = AF_INET; + sa = (struct sockaddr *)&sin; + sa_size = sizeof(sin); strcpy(_hostname, hostp); hostname = _hostname; } else { |