diff options
-rw-r--r-- | src/usr.bin/nc/socks.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/usr.bin/nc/socks.c b/src/usr.bin/nc/socks.c index c665ea731a..ca67c6df59 100644 --- a/src/usr.bin/nc/socks.c +++ b/src/usr.bin/nc/socks.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: socks.c,v 1.12 2005/05/19 08:40:59 djm Exp $ */ | 1 | /* $OpenBSD: socks.c,v 1.13 2005/05/20 11:06:58 djm Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 1999 Niklas Hallqvist. All rights reserved. | 4 | * Copyright (c) 1999 Niklas Hallqvist. All rights reserved. |
@@ -129,7 +129,9 @@ socks_connect(const char *host, const char *port, | |||
129 | if (proxyfd < 0) | 129 | if (proxyfd < 0) |
130 | return (-1); | 130 | return (-1); |
131 | 131 | ||
132 | serveraddr = decode_addr(host); | 132 | /* HTTP proxies should use hostnames. (XXX so can SOCKS5) */ |
133 | if (socksv != -1) | ||
134 | serveraddr = decode_addr(host); | ||
133 | serverport = decode_port(port); | 135 | serverport = decode_port(port); |
134 | 136 | ||
135 | if (socksv == 5) { | 137 | if (socksv == 5) { |