compat for different IPv6-APIs
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3485 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -152,6 +152,10 @@ sockaddr2krb5_address (struct sockaddr *sa,
|
||||
if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) {
|
||||
ka->addr_type = AF_INET;
|
||||
ka->address.length = sizeof(struct in_addr);
|
||||
#ifndef IN6_ADDR_V6_TO_V4
|
||||
#define IN6_ADDR_V6_TO_V4(x) (&IN6_EXTRACT_V4ADDR(x))
|
||||
#endif
|
||||
|
||||
ka->address.data = IN6_ADDR_V6_TO_V4(&sin6->sin6_addr);
|
||||
} else {
|
||||
ka->addr_type = AF_INET6;
|
||||
|
@@ -197,6 +197,10 @@ find_all_addresses (krb5_addresses *res, int loop,
|
||||
|
||||
sin6 = &((struct sockaddr_in6 *)(&ifr->ifr_addr))->sin6_addr;
|
||||
|
||||
#ifndef IN6_IS_ADDR_LOOPBACK
|
||||
#define IN6_IS_ADDR_LOOPBACK(x) IN6_IS_LOOPBACK(*x)
|
||||
#endif
|
||||
|
||||
if (IN6_IS_ADDR_LOOPBACK(sin6)
|
||||
|| IN6_IS_ADDR_LINKLOCAL(sin6)
|
||||
|| IN6_IS_ADDR_V4COMPAT(sin6)) {
|
||||
|
Reference in New Issue
Block a user