Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP3:GA
xinetd.5694
xinetd-ipv6-fallback.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xinetd-ipv6-fallback.patch of Package xinetd.5694
Index: xinetd-2.3.15/xinetd/service.c =================================================================== --- xinetd-2.3.15.orig/xinetd/service.c 2015-09-25 14:25:45.519055472 +0200 +++ xinetd-2.3.15/xinetd/service.c 2015-09-25 16:34:23.566551795 +0200 @@ -374,6 +374,22 @@ status_e svc_activate( struct service *s return( FAILED ) ; } + /* Map the ipv4 address to ipv6 if using ipv6 socket: + * The ipv6 mapped address is in format: + * 10 0x0 bytes, 2 0xff bytes, 4 bytes of the ipv4 address. + * So we append the ipv4 addr after the 12 bytes of the ipv6 prefix + */ + if( SC_IPV6(scp) && SC_BIND_ADDR(scp)->sa_in.sin_family == AF_INET ) { + const char v6_mapped[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xFF, 0xFF }; + union xsockaddr *addr_p = SC_BIND_ADDR(scp); + addr_p->sa_in6.sin6_family = AF_INET6 ; + + memcpy(addr_p->sa_in6.sin6_addr.s6_addr + 12, &addr_p->sa_in.sin_addr.s_addr, 4); + bzero(&addr_p->sa_in6.sin6_flowinfo, sizeof(addr_p->sa_in6.sin6_flowinfo)); + memcpy(&addr_p->sa_in6.sin6_addr.s6_addr, v6_mapped, sizeof(v6_mapped)); + } + #ifndef NO_RPC if ( SC_IS_RPC( scp ) ) status = activate_rpc( sp ) ;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor