From b8c957a3a8a0cfd2d1e71add661654cdca0ee805 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Fri, 23 Feb 2018 13:05:04 +0100 Subject: [PATCH] minissdpd: remove all references to GetIfAddrIPv4() fixes #285 GetIfADdrIPv4() was removed in commit 63179a1f7f8ad5986f0973a0a99e261f738574ea --- minissdpd/openssdpsocket.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/minissdpd/openssdpsocket.c b/minissdpd/openssdpsocket.c index b525e27..890eca6 100644 --- a/minissdpd/openssdpsocket.c +++ b/minissdpd/openssdpsocket.c @@ -1,7 +1,7 @@ /* $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 + * (c) 2006-2018 Thomas Bernard * This software is subject to the conditions detailed * in the LICENCE file provided within the distribution */ @@ -159,13 +159,13 @@ OpenAndConfSSDPReceiveSocket(int ipv6, unsigned char ttl) sa->sin_family = AF_INET; sa->sin_port = htons(SSDP_PORT); #ifdef SSDP_LISTEN_ON_SPECIFIC_ADDR - if(n_listen_addr == 1) + if(lan_addrs.lh_first != NULL && lan_addrs.lh_first->list.le_next == NULL) { - sa->sin_addr.s_addr = GetIfAddrIPv4(listen_addr[0]); + sa->sin_addr.s_addr = lan_addrs.lh_first->addr.s_addr; if(sa->sin_addr.s_addr == INADDR_NONE) { syslog(LOG_ERR, "no IPv4 address for interface %s", - listen_addr[0]); + lan_addrs.lh_first->ifname); close(s); return -1; }