/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <netdb.h>
#include <string.h>
#include <syslog.h>
#include <addr_match.h>
/*
* Function to compare IP addresses. It walks the list provided in
* the res parameter, comparing to the original address in sin or sin6,
* with some addition guidance provided by fromp. It returns B_TRUE
* if a match is found, otherwise B_FALSE.
*/
static boolean_t
const struct sockaddr_storage *fromp,
const struct sockaddr_in *sin,
const struct sockaddr_in6 *sin6)
{
/* This is the moral equivalent of an assert. */
return (B_FALSE);
continue;
/* LINTED E_BAD_PTR_CAST_ALIGN */
/* LINTED E_BAD_PTR_CAST_ALIGN */
} else {
continue;
}
return (B_TRUE);
}
return (B_FALSE);
}
void
const struct sockaddr_storage *fromp,
const struct sockaddr_in *sin,
const struct sockaddr_in6 *sin6,
const char *printable_addr,
char *hostname,
{
/*
* We have to check for spoofing. So take hostname, look up its
* address(es), and walk the list until we have a match with the
* original IP address. If no match is found, log a warning and
* use the original IP address for authentication purposes.
*/
}
if (!match_found) {
"name '%s',\r\n but that host name does not map to "
}
}