- (djm) Bug #180: Set ToS bits on IPv4-in-IPv6 mapped addresses. Based on

patch from openssh@misc.tecq.org
This commit is contained in:
Damien Miller 2002-04-26 16:54:34 +10:00
parent ae9d5af0de
commit aa100c546c
2 changed files with 11 additions and 4 deletions

View File

@ -2,6 +2,8 @@
- (djm) Bug #137, #209: fix make problems for scard/Ssh.bin, do uudecode
during distprep only
- (djm) Disable PAM password expiry until a complete fix for bug #188 exists
- (djm) Bug #180: Set ToS bits on IPv4-in-IPv6 mapped addresses. Based on
patch from openssh@misc.tecq.org
20020425
- (stevesk) [defines.h] remove USE_TIMEVAL; unused
@ -513,4 +515,4 @@
- (stevesk) entropy.c: typo in debug message
- (djm) ssh-keygen -i needs seeded RNG; report from markus@
$Id: ChangeLog,v 1.2087 2002/04/26 01:27:24 djm Exp $
$Id: ChangeLog,v 1.2088 2002/04/26 06:54:34 djm Exp $

View File

@ -277,9 +277,14 @@ packet_connection_is_ipv4(void)
memset(&to, 0, sizeof(to));
if (getsockname(connection_out, (struct sockaddr *)&to, &tolen) < 0)
return 0;
if (to.ss_family != AF_INET)
return 0;
return 1;
if (to.ss_family == AF_INET)
return 1;
#ifdef IPV4_IN_IPV6
if (to.ss_family == AF_INET6 &&
IN6_IS_ADDR_V4MAPPED(&((struct sockaddr_in6 *)&to)->sin6_addr))
return 1;
#endif
return 0;
}
/* Sets the connection into non-blocking mode. */