Commit b91491a8 authored by Paul Henson's avatar Paul Henson Committed by Quanah Gibson-Mount
Browse files

ITS#9481 - fix proxyp when IPv6 disabled

parent 7a8f7c6e
...@@ -162,6 +162,7 @@ proxyp( ber_socket_t sfd, Sockaddr *from ) { ...@@ -162,6 +162,7 @@ proxyp( ber_socket_t sfd, Sockaddr *from ) {
break; break;
case 0x21: /* TCPv6 */ case 0x21: /* TCPv6 */
#ifdef LDAP_PF_INET6
lutil_sockaddrstr( from, &peerbv ); lutil_sockaddrstr( from, &peerbv );
Debug( LDAP_DEBUG_STATS, "proxyp(%ld): via %s\n", Debug( LDAP_DEBUG_STATS, "proxyp(%ld): via %s\n",
(long)sfd, peername ); (long)sfd, peername );
...@@ -169,6 +170,12 @@ proxyp( ber_socket_t sfd, Sockaddr *from ) { ...@@ -169,6 +170,12 @@ proxyp( ber_socket_t sfd, Sockaddr *from ) {
memcpy( &from->sa_in6_addr.sin6_addr, ppa.ip6.src_addr, memcpy( &from->sa_in6_addr.sin6_addr, ppa.ip6.src_addr,
sizeof(ppa.ip6.src_addr) ); sizeof(ppa.ip6.src_addr) );
from->sa_in6_addr.sin6_port = ppa.ip6.src_port; from->sa_in6_addr.sin6_port = ppa.ip6.src_port;
#else
Debug( LDAP_DEBUG_ANY, "proxyp(%ld): "
"IPv6 proxied addresses disabled, \n",
(long)sfd );
return 0;
#endif
break; break;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment