miniupnpd: improve warning log

This commit is contained in:
Thomas Bernard 2015-08-26 10:04:23 +02:00
parent f8f5f2eb97
commit 5873c5a6b4
2 changed files with 5 additions and 2 deletions

View File

@ -185,7 +185,9 @@ OpenAndConfSSDPReceiveSocket(int ipv6)
if(setsockopt(s, SOL_SOCKET, SO_BINDTODEVICE, if(setsockopt(s, SOL_SOCKET, SO_BINDTODEVICE,
lan_addrs.lh_first->ifname, lan_addrs.lh_first->ifname,
strlen(lan_addrs.lh_first->ifname)) < 0) strlen(lan_addrs.lh_first->ifname)) < 0)
syslog(LOG_WARNING, "setsockopt(udp, SO_BINDTODEVICE): %m"); syslog(LOG_WARNING, "%s: setsockopt(udp%s, SO_BINDTODEVICE, %s): %m",
"OpenAndConfSSDPReceiveSocket", ipv6 ? "6" : "",
lan_addrs.lh_first->ifname);
} }
#endif /* defined(SO_BINDTODEVICE) && !defined(MULTIPLE_EXTERNAL_IP) */ #endif /* defined(SO_BINDTODEVICE) && !defined(MULTIPLE_EXTERNAL_IP) */

View File

@ -378,7 +378,8 @@ OpenAndConfHTTPSocket(unsigned short * port)
if(setsockopt(s, SOL_SOCKET, SO_BINDTODEVICE, if(setsockopt(s, SOL_SOCKET, SO_BINDTODEVICE,
lan_addrs.lh_first->ifname, lan_addrs.lh_first->ifname,
strlen(lan_addrs.lh_first->ifname)) < 0) strlen(lan_addrs.lh_first->ifname)) < 0)
syslog(LOG_WARNING, "setsockopt(udp, SO_BINDTODEVICE): %m"); syslog(LOG_WARNING, "setsockopt(http, SO_BINDTODEVICE, %s): %m",
lan_addrs.lh_first->ifname);
} }
#endif /* defined(SO_BINDTODEVICE) && !defined(MULTIPLE_EXTERNAL_IP) */ #endif /* defined(SO_BINDTODEVICE) && !defined(MULTIPLE_EXTERNAL_IP) */