* Use proper SSDP TTL of 4, instead of 1.

This commit is contained in:
Justin Maggard 2012-02-13 22:39:54 +00:00
parent ab33ab34bc
commit cefe05677d

View File

@ -133,6 +133,7 @@ OpenAndConfSSDPNotifySocket(in_addr_t addr)
int s;
unsigned char loopchar = 0;
int bcast = 1;
uint8_t ttl = 4;
struct in_addr mc_if;
struct sockaddr_in sockname;
@ -158,6 +159,8 @@ OpenAndConfSSDPNotifySocket(in_addr_t addr)
return -1;
}
setsockopt(s, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl));
if(setsockopt(s, SOL_SOCKET, SO_BROADCAST, &bcast, sizeof(bcast)) < 0)
{
DPRINTF(E_ERROR, L_SSDP, "setsockopt(udp_notify, SO_BROADCAST): %s\n", strerror(errno));