minissdpd: disable multicast loop
This commit is contained in:
parent
8e5d55a7e8
commit
6ddb505f68
|
@ -1,4 +1,7 @@
|
|||
$Id: Changelog.txt,v 1.42 2015/08/06 13:16:58 nanard Exp $
|
||||
$Id: Changelog.txt,v 1.43 2015/08/06 14:05:49 nanard Exp $
|
||||
|
||||
2015/08/06:
|
||||
disable multicast loop
|
||||
|
||||
VERSION 1.4:
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: openssdpsocket.c,v 1.16 2015/07/21 15:39:37 nanard Exp $ */
|
||||
/* $Id: openssdpsocket.c,v 1.17 2015/08/06 14:05:37 nanard Exp $ */
|
||||
/* MiniUPnP project
|
||||
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
||||
* (c) 2006-2015 Thomas Bernard
|
||||
|
@ -106,6 +106,7 @@ OpenAndConfSSDPReceiveSocket(int ipv6, unsigned char ttl)
|
|||
{
|
||||
int s;
|
||||
int opt = 1;
|
||||
unsigned char loopchar = 0;
|
||||
#ifdef ENABLE_IPV6
|
||||
struct sockaddr_storage sockname;
|
||||
#else /* ENABLE_IPV6 */
|
||||
|
@ -196,6 +197,11 @@ OpenAndConfSSDPReceiveSocket(int ipv6, unsigned char ttl)
|
|||
sockname_len = sizeof(struct sockaddr_in);
|
||||
#endif /* ENABLE_IPV6 */
|
||||
|
||||
if(setsockopt(s, IPPROTO_IP, IP_MULTICAST_LOOP, (char *)&loopchar, sizeof(loopchar)) < 0)
|
||||
{
|
||||
syslog(LOG_WARNING, "setsockopt(IP_MULTICAST_LOOP): %m");
|
||||
}
|
||||
|
||||
if(setsockopt(s, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl)) < 0)
|
||||
{
|
||||
syslog(LOG_WARNING, "setsockopt(IP_MULTICAST_TTL): %m");
|
||||
|
|
Loading…
Reference in New Issue