diff options
author | Darren Tucker <dtucker@cvs.openbsd.org> | 2005-10-03 07:44:43 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@cvs.openbsd.org> | 2005-10-03 07:44:43 +0000 |
commit | 50854b5e96ca0c553189ef8fc8d3e8293c799bbc (patch) | |
tree | 1e5865b29b8112f3149051fd61b7c43536d7e226 /usr.bin/ssh | |
parent | 74eee1d18ad1eaef5745893179454070b72b6e0f (diff) |
Relocate check_ip_options call to prevent logging of garbage for connections
with IP options set. bz#1092 from David Leonard, "looks good" deraadt@
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/canohost.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/ssh/canohost.c b/usr.bin/ssh/canohost.c index e81e048be09..f3296ceecd9 100644 --- a/usr.bin/ssh/canohost.c +++ b/usr.bin/ssh/canohost.c @@ -12,7 +12,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: canohost.c,v 1.44 2005/06/17 02:44:32 djm Exp $"); +RCSID("$OpenBSD: canohost.c,v 1.45 2005/10/03 07:44:42 dtucker Exp $"); #include "packet.h" #include "xmalloc.h" @@ -43,13 +43,13 @@ get_remote_hostname(int sock, int use_dns) cleanup_exit(255); } - if (from.ss_family == AF_INET) - check_ip_options(sock, ntop); - if (getnameinfo((struct sockaddr *)&from, fromlen, ntop, sizeof(ntop), NULL, 0, NI_NUMERICHOST) != 0) fatal("get_remote_hostname: getnameinfo NI_NUMERICHOST failed"); + if (from.ss_family == AF_INET) + check_ip_options(sock, ntop); + if (!use_dns) return xstrdup(ntop); |