miniupnpd/minissdp.c: Add IPV6 multicast membership only on selected "LAN" interfaces

This commit is contained in:
Thomas Bernard 2014-05-22 10:22:04 +02:00
parent 00fbdb70cf
commit c4c2f79c12
2 changed files with 8 additions and 3 deletions

View File

@ -3,6 +3,7 @@ $Id: Changelog.txt,v 1.374 2014/05/22 07:56:32 nanard Exp $
2014/05/22: 2014/05/22:
Add ipv6_bind_address (option "ipv6_listening_ip") Add ipv6_bind_address (option "ipv6_listening_ip")
disable IPv6 when socket(PF_INTET6, ...) errors with EAFNOSUPPORT disable IPv6 when socket(PF_INTET6, ...) errors with EAFNOSUPPORT
Add IPV6 multicast membership only on selected "LAN" interfaces
2014/05/20: 2014/05/20:
be more strict when parsing LAN addresses / interface names be more strict when parsing LAN addresses / interface names

View File

@ -165,10 +165,14 @@ OpenAndConfSSDPReceiveSocket(int ipv6)
#ifdef ENABLE_IPV6 #ifdef ENABLE_IPV6
if(ipv6) if(ipv6)
{ {
if(AddMulticastMembershipIPv6(s, 0) < 0) for(lan_addr = lan_addrs.lh_first; lan_addr != NULL; lan_addr = lan_addr->list.le_next)
{
if(AddMulticastMembershipIPv6(s, lan_addr->index) < 0)
{ {
syslog(LOG_WARNING, syslog(LOG_WARNING,
"Failed to add IPv6 multicast membership"); "Failed to add IPv6 multicast membership for interface %s",
lan_addr->str ? lan_addr->str : "NULL");
}
} }
} }
else else