~ubuntu-branches/ubuntu/lucid/openssh/lucid

« back to all changes in this revision

Viewing changes to dns.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2008-09-30 23:09:58 UTC
  • mfrom: (1.13.3 upstream) (29 hardy)
  • mto: This revision was merged to the branch mainline in revision 43.
  • Revision ID: james.westby@ubuntu.com-20080930230958-o6vsgn8c4mm959s0
Tags: 1:5.1p1-3
* Remove unnecessary ssh-vulnkey output in non-verbose mode when no
  compromised or unknown keys were found (closes: #496495).
* Configure with --disable-strip; dh_strip will deal with stripping
  binaries and will honour DEB_BUILD_OPTIONS (thanks, Bernhard R. Link;
  closes: #498681).
* Fix handling of zero-length server banners (thanks, Tomas Mraz; closes:
  #497026).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $OpenBSD: dns.c,v 1.24 2007/01/03 03:01:40 stevesk Exp $ */
 
1
/* $OpenBSD: dns.c,v 1.25 2008/06/12 00:03:49 dtucker Exp $ */
2
2
 
3
3
/*
4
4
 * Copyright (c) 2003 Wesley Griffin. All rights reserved.
145
145
{
146
146
        struct addrinfo hints, *ai;
147
147
 
 
148
        /*
 
149
         * We shouldn't ever get a null host but if we do then log an error
 
150
         * and return -1 which stops DNS key fingerprint processing.
 
151
         */
 
152
        if (hostname == NULL) {
 
153
                error("is_numeric_hostname called with NULL hostname");
 
154
                return -1;
 
155
        }
 
156
 
148
157
        memset(&hints, 0, sizeof(hints));
149
158
        hints.ai_socktype = SOCK_DGRAM;
150
159
        hints.ai_flags = AI_NUMERICHOST;
151
160
 
152
 
        if (getaddrinfo(hostname, "0", &hints, &ai) == 0) {
 
161
        if (getaddrinfo(hostname, NULL, &hints, &ai) == 0) {
153
162
                freeaddrinfo(ai);
154
163
                return -1;
155
164
        }