mirror of
https://github.com/status-im/miniupnp.git
synced 2025-01-21 19:59:09 +00:00
fix previous commit. to be squashed
This commit is contained in:
parent
8b6cdff7d7
commit
ff4569d2f9
@ -200,19 +200,20 @@ OpenAndConfSSDPReceiveSocket(int ipv6)
|
||||
if(!ipv6) {
|
||||
if(setsockopt(s, IPPROTO_IP, IP_RECVIF, &on, sizeof(on)) < 0)
|
||||
{
|
||||
syslog(LOG_WARNING, "setsockopt(udp, IPRECVIF): %m");
|
||||
syslog(LOG_WARNING, "setsockopt(udp, IP_RECVIF): %m");
|
||||
}
|
||||
}
|
||||
#endif /* IP_RECVIF */
|
||||
#ifdef IP_PKTINFO
|
||||
/* Linux */
|
||||
if(!ipv6) {
|
||||
if(setsockopt(s, IPPROTO_IP, IP_RECVIF, &on, sizeof(on)) < 0)
|
||||
if(setsockopt(s, IPPROTO_IP, IP_PKTINFO, &on, sizeof(on)) < 0)
|
||||
{
|
||||
syslog(LOG_WARNING, "setsockopt(udp, IPRECVIF): %m");
|
||||
syslog(LOG_WARNING, "setsockopt(udp, IP_PKTINFO): %m");
|
||||
}
|
||||
}
|
||||
#endif /* IP_PKTINFO */
|
||||
/* TODO : for IPV6 */
|
||||
|
||||
if(!set_non_blocking(s))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user