Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
BIND
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
635
Issues
635
List
Boards
Labels
Service Desk
Milestones
Merge Requests
107
Merge Requests
107
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
BIND
Commits
83138389
Commit
83138389
authored
Jun 15, 2000
by
Michael Graff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Conditionalize setting of struct sockaddr_in6's sin6_scope_id member.
Some machines have it, older ipv6 flavors do not.
parent
99f3a24e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
106 additions
and
42 deletions
+106
-42
acconfig.h
acconfig.h
+6
-0
config.h.in
config.h.in
+6
-6
configure
configure
+67
-33
configure.in
configure.in
+20
-2
lib/lwres/getaddrinfo.c
lib/lwres/getaddrinfo.c
+7
-1
No files found.
acconfig.h
View file @
83138389
...
...
@@ -56,6 +56,12 @@
/* define if chroot() is available */
#undef HAVE_CHROOT
/* define if struct addrinfo exists */
#undef HAVE_ADDRINFO
/* define is getaddrinfo() exists */
#undef HAVE_GETADDRINFO
/* Shut up warnings about sputaux in stdio.h on BSD/OS pre-4.1 */
#undef SHUTUP_SPUTAUX
#ifdef SHUTUP_SPUTAUX
...
...
config.h.in
View file @
83138389
...
...
@@ -67,6 +67,12 @@
/* define if chroot() is available */
#undef HAVE_CHROOT
/* define if struct addrinfo exists */
#undef HAVE_ADDRINFO
/* define is getaddrinfo() exists */
#undef HAVE_GETADDRINFO
/* Shut up warnings about sputaux in stdio.h on BSD/OS pre-4.1 */
#undef SHUTUP_SPUTAUX
#ifdef SHUTUP_SPUTAUX
...
...
@@ -124,9 +130,3 @@ int sigwait(const unsigned int *set, int *sig);
/* Define if you have the socket library (-lsocket). */
#undef HAVE_LIBSOCKET
/* Define if you have the addrinfo struct */
#undef HAVE_ADDRINFO
/* Define if you have the getaddrinfo function */
#undef HAVE_GETADDRINFO
configure
View file @
83138389
...
...
@@ -3570,10 +3570,11 @@ case "$found_ipv6" in
yes
)
ISC_PLATFORM_HAVEIPV6
=
"#define ISC_PLATFORM_HAVEIPV6 1"
LWRES_PLATFORM_HAVEIPV6
=
"#define LWRES_PLATFORM_HAVEIPV6 1"
echo
$ac_n
"checking for in6addr_any""...
$ac_c
"
1>&6
echo
"configure:357
5
: checking for in6addr_any"
>
&5
echo
"configure:357
6
: checking for in6addr_any"
>
&5
cat
>
conftest.
$ac_ext
<<
EOF
#line 357
7
"configure"
#line 357
8
"configure"
#include "confdefs.h"
#include <sys/types.h>
...
...
@@ -3584,7 +3585,7 @@ int main() {
struct in6_addr in6; in6 = in6addr_any; return (0);
; return 0; }
EOF
if
{
(
eval echo
configure:358
8
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
if
{
(
eval echo
configure:358
9
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
rm
-rf
conftest
*
echo
"
$ac_t
""yes"
1>&6
ISC_PLATFORM_NEEDIN6ADDRANY
=
"#undef ISC_PLATFORM_NEEDIN6ADDRANY"
...
...
@@ -3598,10 +3599,41 @@ else
LWRES_PLATFORM_NEEDIN6ADDRANY
=
"#define LWRES_PLATFORM_NEEDIN6ADDRANY 1"
fi
rm
-f
conftest
*
echo
$ac_n
"checking for sin6_scope_id in struct sockaddr_in6""...
$ac_c
"
1>&6
echo
"configure:3605: checking for sin6_scope_id in struct sockaddr_in6"
>
&5
cat
>
conftest.
$ac_ext
<<
EOF
#line 3607 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
$isc_netinetin6_hack
$isc_netinet6in6_hack
int main() {
struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0);
; return 0; }
EOF
if
{
(
eval echo
configure:3620:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
echo
"
$ac_t
""yes"
1>&6
result
=
"#define LWRES_HAVE_SIN6_SCOPE_ID 1"
else
echo
"configure: failed program was:"
>
&5
cat
conftest.
$ac_ext
>
&5
rm
-rf
conftest
*
echo
"
$ac_t
""no"
1>&6
result
=
"#undef LWRES_HAVE_SIN6_SCOPE_ID"
fi
rm
-f
conftest
*
LWRES_HAVE_SIN6_SCOPE_ID
=
"
$result
"
echo
$ac_n
"checking for in6_pktinfo""...
$ac_c
"
1>&6
echo
"configure:36
03
: checking for in6_pktinfo"
>
&5
echo
"configure:36
35
: checking for in6_pktinfo"
>
&5
cat
>
conftest.
$ac_ext
<<
EOF
#line 36
05
"configure"
#line 36
37
"configure"
#include "confdefs.h"
#include <sys/types.h>
...
...
@@ -3614,7 +3646,7 @@ int main() {
struct in6_pktinfo xyzzy; return (0);
; return 0; }
EOF
if
{
(
eval echo
configure:36
18
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:36
50
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
echo
"
$ac_t
""yes"
1>&6
ISC_PLATFORM_HAVEIN6PKTINFO
=
"#define ISC_PLATFORM_HAVEIN6PKTINFO 1"
...
...
@@ -3633,6 +3665,7 @@ rm -f conftest*
ISC_PLATFORM_NEEDIN6ADDRANY
=
"#undef ISC_PLATFORM_NEEDIN6ADDRANY"
LWRES_PLATFORM_NEEDIN6ADDRANY
=
"#undef LWRES_PLATFORM_NEEDIN6ADDRANY"
ISC_PLATFORM_HAVEIN6PKTINFO
=
"#undef ISC_PLATFORM_HAVEIN6PKTINFO"
LWRES_HAVE_SIN6_SCOPE_ID
=
"#define LWRES_HAVE_SIN6_SCOPE_ID 1"
ISC_IPV6_H
=
"ipv6.h"
ISC_IPV6_O
=
"ipv6.
$O
"
ISC_ISCIPV6_O
=
"unix/ipv6.
$O
"
...
...
@@ -3660,9 +3693,9 @@ esac
# the files.
#
echo
$ac_n
"checking for inet_ntop""...
$ac_c
"
1>&6
echo
"configure:36
64
: checking for inet_ntop"
>
&5
echo
"configure:36
97
: checking for inet_ntop"
>
&5
cat
>
conftest.
$ac_ext
<<
EOF
#line 36
66
"configure"
#line 36
99
"configure"
#include "confdefs.h"
#include <sys/types.h>
...
...
@@ -3672,7 +3705,7 @@ int main() {
inet_ntop(0, 0, 0, 0); return (0);
; return 0; }
EOF
if
{
(
eval echo
configure:3
676
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
if
{
(
eval echo
configure:3
709
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
rm
-rf
conftest
*
echo
"
$ac_t
""yes"
1>&6
ISC_PLATFORM_NEEDNTOP
=
"#undef ISC_PLATFORM_NEEDNTOP"
...
...
@@ -3687,9 +3720,9 @@ else
fi
rm
-f
conftest
*
echo
$ac_n
"checking for inet_pton""...
$ac_c
"
1>&6
echo
"configure:3
691
: checking for inet_pton"
>
&5
echo
"configure:3
724
: checking for inet_pton"
>
&5
cat
>
conftest.
$ac_ext
<<
EOF
#line 3
693
"configure"
#line 3
726
"configure"
#include "confdefs.h"
#include <sys/types.h>
...
...
@@ -3699,7 +3732,7 @@ int main() {
inet_pton(0, 0, 0); return (0);
; return 0; }
EOF
if
{
(
eval echo
configure:37
03
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
if
{
(
eval echo
configure:37
36
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
rm
-rf
conftest
*
echo
"
$ac_t
""yes"
1>&6
ISC_PLATFORM_NEEDPTON
=
"#undef ISC_PLATFORM_NEEDPTON"
...
...
@@ -3714,9 +3747,9 @@ else
fi
rm
-f
conftest
*
echo
$ac_n
"checking for inet_aton""...
$ac_c
"
1>&6
echo
"configure:37
18
: checking for inet_aton"
>
&5
echo
"configure:37
51
: checking for inet_aton"
>
&5
cat
>
conftest.
$ac_ext
<<
EOF
#line 37
20
"configure"
#line 37
53
"configure"
#include "confdefs.h"
#include <sys/types.h>
...
...
@@ -3726,7 +3759,7 @@ int main() {
struct in_addr in; inet_aton(0, &in); return (0);
; return 0; }
EOF
if
{
(
eval echo
configure:37
30
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
if
{
(
eval echo
configure:37
63
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
rm
-rf
conftest
*
echo
"
$ac_t
""yes"
1>&6
ISC_PLATFORM_NEEDATON
=
"#undef ISC_PLATFORM_NEEDATON"
...
...
@@ -3747,12 +3780,12 @@ rm -f conftest*
# Check for some other useful functions that are not ever-present.
echo
$ac_n
"checking for strsep""...
$ac_c
"
1>&6
echo
"configure:37
51
: checking for strsep"
>
&5
echo
"configure:37
84
: checking for strsep"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_func_strsep
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 37
56
"configure"
#line 37
89
"configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char strsep(); below. */
...
...
@@ -3775,7 +3808,7 @@ strsep();
; return 0; }
EOF
if
{
(
eval echo
configure:3
779
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
if
{
(
eval echo
configure:3
812
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
rm
-rf
conftest
*
eval
"ac_cv_func_strsep=yes"
else
...
...
@@ -3796,12 +3829,12 @@ ISC_PLATFORM_NEEDSTRSEP="#define ISC_PLATFORM_NEEDSTRSEP 1"
fi
echo
$ac_n
"checking for vsnprintf""...
$ac_c
"
1>&6
echo
"configure:38
00
: checking for vsnprintf"
>
&5
echo
"configure:38
33
: checking for vsnprintf"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_func_vsnprintf
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 38
05
"configure"
#line 38
38
"configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vsnprintf(); below. */
...
...
@@ -3824,7 +3857,7 @@ vsnprintf();
; return 0; }
EOF
if
{
(
eval echo
configure:38
28
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
if
{
(
eval echo
configure:38
61
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
rm
-rf
conftest
*
eval
"ac_cv_func_vsnprintf=yes"
else
...
...
@@ -3853,17 +3886,17 @@ fi
echo
$ac_n
"checking for sizeof(long long int) == sizeof(long int)""...
$ac_c
"
1>&6
echo
"configure:38
57
: checking for sizeof(long long int) == sizeof(long int)"
>
&5
echo
"configure:38
90
: checking for sizeof(long long int) == sizeof(long int)"
>
&5
if
test
"
$cross_compiling
"
=
yes
;
then
echo
"
$ac_t
""default yes"
1>&6
ISC_PLATFORM_LONGLONGEQUALLONG
=
"#define ISC_PLATFORM_LONGLONGEQUALLONG 1"
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 38
63
"configure"
#line 38
96
"configure"
#include "confdefs.h"
main() { exit(!(sizeof(long long int) == sizeof(long int))); }
EOF
if
{
(
eval echo
configure:3
867
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
&&
(
./conftest
;
exit
)
2>/dev/null
if
{
(
eval echo
configure:3
900
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
&&
(
./conftest
;
exit
)
2>/dev/null
then
echo
"
$ac_t
""yes"
1>&6
ISC_PLATFORM_LONGLONGEQUALLONG
=
"#define ISC_PLATFORM_LONGLONGEQUALLONG 1"
...
...
@@ -3883,12 +3916,12 @@ fi
# Security Stuff
#
echo
$ac_n
"checking for chroot""...
$ac_c
"
1>&6
echo
"configure:3
887
: checking for chroot"
>
&5
echo
"configure:3
920
: checking for chroot"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_func_chroot
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 3
892
"configure"
#line 3
925
"configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char chroot(); below. */
...
...
@@ -3911,7 +3944,7 @@ chroot();
; return 0; }
EOF
if
{
(
eval echo
configure:39
15
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
if
{
(
eval echo
configure:39
48
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
rm
-rf
conftest
*
eval
"ac_cv_func_chroot=yes"
else
...
...
@@ -3937,17 +3970,17 @@ for ac_hdr in linux/capability.h
do
ac_safe
=
`
echo
"
$ac_hdr
"
|
sed
'y%./+-%__p_%'
`
echo
$ac_n
"checking for
$ac_hdr
""...
$ac_c
"
1>&6
echo
"configure:39
41
: checking for
$ac_hdr
"
>
&5
echo
"configure:39
74
: checking for
$ac_hdr
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_
$ac_safe
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 39
46
"configure"
#line 39
79
"configure"
#include "confdefs.h"
#include <
$ac_hdr
>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:39
51
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:39
84
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out |
grep
-v
"^conftest.
${
ac_ext
}
\$
"
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -3977,17 +4010,17 @@ for ac_hdr in linux/prctl.h
do
ac_safe
=
`
echo
"
$ac_hdr
"
|
sed
'y%./+-%__p_%'
`
echo
$ac_n
"checking for
$ac_hdr
""...
$ac_c
"
1>&6
echo
"configure:
3981
: checking for
$ac_hdr
"
>
&5
echo
"configure:
4014
: checking for
$ac_hdr
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_
$ac_safe
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line
3986
"configure"
#line
4019
"configure"
#include "confdefs.h"
#include <
$ac_hdr
>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:
3991
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:
4024
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out |
grep
-v
"^conftest.
${
ac_ext
}
\$
"
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -4389,6 +4422,7 @@ s%@ISC_IPV6_H@%$ISC_IPV6_H%g
s%@ISC_IPV6_O@%
$ISC_IPV6_O
%g
s%@ISC_ISCIPV6_O@%
$ISC_ISCIPV6_O
%g
s%@ISC_IPV6_C@%
$ISC_IPV6_C
%g
s%@LWRES_HAVE_SIN6_SCOPE_ID@%
$LWRES_HAVE_SIN6_SCOPE_ID
%g
s%@ISC_PLATFORM_NEEDNTOP@%
$ISC_PLATFORM_NEEDNTOP
%g
s%@ISC_PLATFORM_NEEDPTON@%
$ISC_PLATFORM_NEEDPTON
%g
s%@ISC_PLATFORM_NEEDATON@%
$ISC_PLATFORM_NEEDATON
%g
...
...
configure.in
View file @
83138389
...
...
@@ -13,7 +13,7 @@ dnl PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
dnl ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
dnl SOFTWARE.
AC_REVISION($Revision: 1.14
8
$)
AC_REVISION($Revision: 1.14
9
$)
AC_PREREQ(2.13)
...
...
@@ -715,6 +715,7 @@ case "$found_ipv6" in
yes)
ISC_PLATFORM_HAVEIPV6="#define ISC_PLATFORM_HAVEIPV6 1"
LWRES_PLATFORM_HAVEIPV6="#define LWRES_PLATFORM_HAVEIPV6 1"
AC_MSG_CHECKING(for in6addr_any)
AC_TRY_LINK([
#include <sys/types.h>
...
...
@@ -728,6 +729,22 @@ $isc_netinetin6_hack],
[AC_MSG_RESULT(no)
ISC_PLATFORM_NEEDIN6ADDRANY="#define ISC_PLATFORM_NEEDIN6ADDRANY 1"
LWRES_PLATFORM_NEEDIN6ADDRANY="#define LWRES_PLATFORM_NEEDIN6ADDRANY 1"])
AC_MSG_CHECKING(for sin6_scope_id in struct sockaddr_in6)
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
$isc_netinetin6_hack
$isc_netinet6in6_hack
],
[struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0);],
[AC_MSG_RESULT(yes)
result="#define LWRES_HAVE_SIN6_SCOPE_ID 1"],
[AC_MSG_RESULT(no)
result="#undef LWRES_HAVE_SIN6_SCOPE_ID"])
LWRES_HAVE_SIN6_SCOPE_ID="$result"
AC_MSG_CHECKING(for in6_pktinfo)
AC_TRY_COMPILE([
#include <sys/types.h>
...
...
@@ -748,6 +765,7 @@ $isc_netinet6in6_hack
ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"
LWRES_PLATFORM_NEEDIN6ADDRANY="#undef LWRES_PLATFORM_NEEDIN6ADDRANY"
ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"
LWRES_HAVE_SIN6_SCOPE_ID="#define LWRES_HAVE_SIN6_SCOPE_ID 1"
ISC_IPV6_H="ipv6.h"
ISC_IPV6_O="ipv6.$O"
ISC_ISCIPV6_O="unix/ipv6.$O"
...
...
@@ -768,7 +786,7 @@ AC_SUBST(ISC_IPV6_H)
AC_SUBST(ISC_IPV6_O)
AC_SUBST(ISC_ISCIPV6_O)
AC_SUBST(ISC_IPV6_C)
AC_SUBST(LWRES_HAVE_SIN6_SCOPE_ID)
#
# Check for network functions that are often missing. We do this
# after the libtool checking, so we can put the right suffix on
...
...
lib/lwres/getaddrinfo.c
View file @
83138389
...
...
@@ -3,7 +3,7 @@
* The Berkeley Software Design Inc. software License Agreement specifies
* the terms and conditions for redistribution.
*
* BSDI $Id: getaddrinfo.c,v 1.2
0 2000/06/15 18:49:53
explorer Exp $
* BSDI $Id: getaddrinfo.c,v 1.2
1 2000/06/15 21:52:21
explorer Exp $
*/
#include <config.h>
...
...
@@ -217,9 +217,12 @@ lwres_getaddrinfo(const char *hostname, const char *servname,
char
nbuf
[
NI_MAXHOST
];
char
ntmp
[
NI_MAXHOST
];
int
addrsize
,
addroff
;
#if defined(LWRES_HAVE_SIN6_SCOPE_ID)
char
*
p
,
*
ep
;
lwres_uint32_t
scopeid
;
#endif
#if defined(LWRES_HAVE_SIN6_SCOPE_ID)
/* scope identifier portion */
ntmp
[
0
]
=
'\0'
;
if
(
strchr
(
hostname
,
'%'
)
!=
NULL
)
{
...
...
@@ -244,6 +247,7 @@ lwres_getaddrinfo(const char *hostname, const char *servname,
}
}
else
scopeid
=
0
;
#endif
if
(
lwres_net_pton
(
AF_INET
,
hostname
,
(
struct
in_addr
*
)
abuf
))
{
if
(
family
==
AF_INET6
)
{
...
...
@@ -283,8 +287,10 @@ lwres_getaddrinfo(const char *hostname, const char *servname,
SIN
(
ai
->
ai_addr
)
->
sin_port
=
port
;
memcpy
((
char
*
)
ai
->
ai_addr
+
addroff
,
abuf
,
addrsize
);
if
(
flags
&
AI_CANONNAME
)
{
#if defined(LWRES_HAVE_SIN6_SCOPE_ID)
if
(
ai
->
ai_family
==
AF_INET6
)
SIN6
(
ai
->
ai_addr
)
->
sin6_scope_id
=
scopeid
;
#endif
if
(
lwres_getnameinfo
(
ai
->
ai_addr
,
ai
->
ai_addrlen
,
nbuf
,
sizeof
(
nbuf
),
NULL
,
0
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment