30 lines
1.1 KiB
Diff
30 lines
1.1 KiB
Diff
--- xinetd-2.3.14/xinetd/service.c.old 2007-05-16 15:33:41.000000000 +0200
|
|
+++ xinetd-2.3.14/xinetd/service.c 2007-05-16 15:29:53.000000000 +0200
|
|
@@ -335,6 +335,15 @@
|
|
|
|
if ( SVC_FD(sp) == -1 )
|
|
{
|
|
+ if (SC_BIND_ADDR(scp) == NULL && SC_IPV6( scp ))
|
|
+ {
|
|
+ /* there was no bind address configured and IPv6 fails. Try IPv4 */
|
|
+ msg( LOG_NOTICE, func, "IPv6 socket creation failed for service %s, trying IPv4", SC_ID( scp ) ) ;
|
|
+ M_CLEAR(SC_XFLAGS(scp), SF_IPV6);
|
|
+ M_SET(SC_XFLAGS(scp), SF_IPV4);
|
|
+ return svc_activate(sp);
|
|
+ }
|
|
+
|
|
msg( LOG_ERR, func,
|
|
"socket creation failed (%m). service = %s", SC_ID( scp ) ) ;
|
|
return( FAILED ) ;
|
|
--- xinetd-2.3.14/xinetd/confparse.c.old 2007-05-16 15:33:26.000000000 +0200
|
|
+++ xinetd-2.3.14/xinetd/confparse.c 2007-05-16 15:15:22.000000000 +0200
|
|
@@ -245,7 +245,7 @@
|
|
M_SET(SC_XFLAGS(scp), SF_IPV6);
|
|
}
|
|
else
|
|
- M_SET(SC_XFLAGS(scp), SF_IPV4);
|
|
+ M_SET(SC_XFLAGS(scp), SF_IPV6); /*try bind IPv6 by default*/
|
|
}
|
|
|
|
if (SC_ORIG_BIND_ADDR(scp))
|