xinetd/SOURCES/xinetd-2.3.14-ipv6confusion.patch
2021-09-10 06:00:34 +00:00

18 lines
873 B
Diff

--- xinetd-2.3.14/xinetd/ident.c.jw 2010-03-10 17:49:53.000000000 +1100
+++ xinetd-2.3.14/xinetd/ident.c 2010-03-10 17:50:30.000000000 +1100
@@ -108,12 +108,12 @@
memcpy( &sin_bind, &sin_local, sizeof(sin_bind) ) ;
local_port = 0;
remote_port = 0;
- if( sin_remote.sa.sa_family == AF_INET ) {
+ if( sin_remote.sa.sa_family == AF_INET6 ) {
local_port = ntohs( sin_local.sa_in6.sin6_port ) ;
remote_port = ntohs( sin_remote.sa_in6.sin6_port ) ;
sin_contact.sa_in6.sin6_port = htons( IDENTITY_SERVICE_PORT ) ;
sin_bind.sa_in.sin_port = 0 ;
- } else if( sin_remote.sa.sa_family == AF_INET6 ) {
+ } else if( sin_remote.sa.sa_family == AF_INET ) {
local_port = ntohs( sin_local.sa_in.sin_port ) ;
remote_port = ntohs( sin_remote.sa_in.sin_port ) ;
sin_contact.sa_in.sin_port = htons( IDENTITY_SERVICE_PORT ) ;