Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37553061
en ru br
Репозитории ALT
S:2.3.15-alt6
5.1: 2.3.14-alt3
4.1: 2.3.14-alt3
4.0: 2.3.14-alt2
3.0: 2.3.13-alt4
www.altlinux.org/Changes

Группа :: Система/Основа
Пакет: xinetd

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: xinetd-2.3.14-cvs-20051128.patch
Скачать


Index: CHANGELOG
===================================================================
RCS file: /cvs/xinetd/xinetd/CHANGELOG,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -p -a -r1.47 -r1.48
--- CHANGELOG	11 Oct 2005 16:07:17 -0000	1.47
+++ CHANGELOG	28 Nov 2005 16:54:43 -0000	1.48
@@ -907,3 +907,7 @@ This file describes the changes to xinet
 		Based on a patch from Tony Ernst.
 	Remove the <1024 port check for UDP builtin services.
 		This check has been rather antiquated for years.
+
+devel
+	If the address we're binding to is a multicast address, do the
+		multicast join.
Index: xinetd/service.c
===================================================================
RCS file: /cvs/xinetd/xinetd/xinetd/service.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -p -a -r1.26 -r1.27
--- xinetd/service.c	8 Apr 2005 21:23:07 -0000	1.26
+++ xinetd/service.c	28 Nov 2005 16:54:43 -0000	1.27
@@ -200,7 +200,7 @@ static status_e activate_rpc( struct ser
       return( FAILED ) ;
    }
    
-   if( tsin.sa.sa_family == AF_INET ) 
+   if( tsin.sa.sa_family == AF_INET )
       SC_SET_PORT( scp, ntohs( tsin.sa_in.sin_port ) ) ;
    else if( tsin.sa.sa_family == AF_INET6 )
       SC_SET_PORT( scp, ntohs( tsin.sa_in6.sin6_port ) ) ;
@@ -301,6 +301,17 @@ static status_e activate_normal( struct 
       return( FAILED ) ;
    }
 
+#ifdef IN_MULTICAST
+   if( SC_IPV4(scp) && IN_MULTICAST(tsin.sa_in.sin_addr.s_addr) ) {
+      struct ip_mreq mreq;
+      mreq.imr_multiaddr.s_addr = tsin.sa_in.sin_addr.s_addr;
+      mreq.imr_interface.s_addr = htonl(INADDR_ANY);
+      setsockopt(sd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq));
+      if ( debug.on )
+         msg( LOG_DEBUG, func, "Adding multicast membership." );
+   }
+#endif
+
    return( OK ) ;
 }
 
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin