Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
ISC Open Source Projects
BIND
Commits
43501e65
Commit
43501e65
authored
Feb 02, 2006
by
Mark Andrews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1978. [port] Handle systems which have a broken recvmsg().
[RT #15742]
parent
c2b2bd69
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
5 deletions
+59
-5
CHANGES
CHANGES
+3
-0
config.h.in
config.h.in
+5
-1
configure
configure
+16
-2
configure.in
configure.in
+12
-1
lib/isc/unix/socket.c
lib/isc/unix/socket.c
+23
-1
No files found.
CHANGES
View file @
43501e65
1978. [port] Handle systems which have a broken recvmsg().
[RT #15742]
1977. [bug] Silence noisy log message. [RT #15704]
1976. [bug] Handle systems with no IPv4 addresses. [RT #15695]
...
...
config.h.in
View file @
43501e65
...
...
@@ -16,7 +16,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: config.h.in,v 1.7
7
2006/0
1
/0
5 00:30:34
marka Exp $ */
/* $Id: config.h.in,v 1.7
8
2006/0
2
/0
2 23:07:53
marka Exp $ */
/*! \file */
...
...
@@ -150,6 +150,10 @@ int sigwait(const unsigned int *set, int *sig);
/* Define if threads need PTHREAD_SCOPE_SYSTEM */
#undef NEED_PTHREAD_SCOPE_SYSTEM
/* Define if recvmsg() does not meet all of the BSD socket API specifications.
*/
#undef BROKEN_RECVMSG
/* Define if you cannot bind() before connect() for TCP sockets. */
#undef BROKEN_TCP_BIND_BEFORE_CONNECT
...
...
configure
View file @
43501e65
...
...
@@ -14,7 +14,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
#
# $Id: configure,v 1.38
8
2006/0
1
/0
5 00:30:34
marka Exp $
# $Id: configure,v 1.38
9
2006/0
2
/0
2 23:07:53
marka Exp $
#
# Portions Copyright (C) 1996-2001 Nominum, Inc.
#
...
...
@@ -29,7 +29,7 @@
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
# From configure.in Revision: 1.40
0
.
# From configure.in Revision: 1.40
1
.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59.
#
...
...
@@ -27278,6 +27278,20 @@ fi
;;
esac
#
# Some hosts need msg_namelen to match the size of the socket stucture.
# Some hosts don't set msg_namelen appropriately on return from recvmsg().
#
case $host in
*os2*|*hp-mpeix*)
cat >>confdefs.h <<\_ACEOF
#define BROKEN_RECVMSG 1
_ACEOF
;;
esac
#
# Microsoft has their own way of handling shared libraries that requires
# additional qualifiers on extern variables. Unix systems don't need it.
...
...
configure.in
View file @
43501e65
...
...
@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(1)dnl
esyscmd([sed "s/^/# /" COPYRIGHT])dnl
AC_DIVERT_POP()dnl
AC_REVISION($Revision: 1.40
0
$)
AC_REVISION($Revision: 1.40
1
$)
AC_INIT(lib/dns/name.c)
AC_PREREQ(2.59)
...
...
@@ -1780,6 +1780,17 @@ case "$host" in
;;
esac
#
# Some hosts need msg_namelen to match the size of the socket stucture.
# Some hosts don't set msg_namelen appropriately on return from recvmsg().
#
case $host in
*os2*|*hp-mpeix*)
AC_DEFINE(BROKEN_RECVMSG, 1,
[Define if recvmsg() does not meet all of the BSD socket API specifications.])
;;
esac
#
# Microsoft has their own way of handling shared libraries that requires
# additional qualifiers on extern variables. Unix systems don't need it.
...
...
lib/isc/unix/socket.c
View file @
43501e65
...
...
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: socket.c,v 1.26
1
200
5/12/07 04:21:27 explorer
Exp $ */
/* $Id: socket.c,v 1.26
2
200
6/02/02 23:06:45 marka
Exp $ */
/*! \file */
...
...
@@ -768,8 +768,26 @@ build_msghdr_recv(isc_socket_t *sock, isc_socketevent_t *dev,
if
(
sock
->
type
==
isc_sockettype_udp
)
{
memset
(
&
dev
->
address
,
0
,
sizeof
(
dev
->
address
));
#ifdef BROKEN_RECVMSG
if
(
sock
->
pf
==
AF_INET
)
{
msg
->
msg_name
=
(
void
*
)
&
dev
->
address
.
type
.
sin
;
msg
->
msg_namelen
=
sizeof
(
dev
->
address
.
type
.
sin6
);
}
else
if
(
sock
->
pf
==
AF_INET6
)
{
msg
->
msg_name
=
(
void
*
)
&
dev
->
address
.
type
.
sin6
;
msg
->
msg_namelen
=
sizeof
(
dev
->
address
.
type
.
sin6
);
#ifdef ISC_PLATFORM_HAVESYSUNH
}
else
if
(
sock
->
pf
==
AF_UNIX
)
{
msg
->
msg_name
=
(
void
*
)
&
dev
->
address
.
type
.
sunix
;
msg
->
msg_namelen
=
sizeof
(
dev
->
address
.
type
.
sunix
);
#endif
}
else
{
msg
->
msg_name
=
(
void
*
)
&
dev
->
address
.
type
.
sa
;
msg
->
msg_namelen
=
sizeof
(
dev
->
address
.
type
);
}
#else
msg
->
msg_name
=
(
void
*
)
&
dev
->
address
.
type
.
sa
;
msg
->
msg_namelen
=
sizeof
(
dev
->
address
.
type
);
#endif
#ifdef ISC_NET_RECVOVERFLOW
/* If needed, steal one iovec for overflow detection. */
maxiov
--
;
...
...
@@ -942,6 +960,10 @@ doio_recv(isc_socket_t *sock, isc_socketevent_t *dev) {
cc
=
recvmsg
(
sock
->
fd
,
&
msghdr
,
0
);
recv_errno
=
errno
;
#if defined(ISC_SOCKET_DEBUG)
dump_msg
(
&
msghdr
);
#endif
if
(
cc
<
0
)
{
if
(
SOFT_ERROR
(
recv_errno
))
return
(
DOIO_SOFT
);
...
...
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