2020-06-09 Fabrice Fontaine <fontaine.fabrice(at)gmail.com>
Drop UpnpInit
GitHub #182
This function is deprecated since a long time moreover it is vulnerable
to CallStranger a.k.a. CVE-2020-12695 and can't be fixed without
breaking the API as HostIP only allows the user to pass an IP address
and not a netmask.
If we want to discover the netmask from the HostIP provided in UPnPInit,
we'll have to loop through all the available interfaces to find the
interface with the given IP address to finally retrieve the netmask.
This is a lot of work/modification for a deprecated function. Moreover,
in the end UPnPInit will be like a "deprecated" (i.e. IPv4-only) version
of UPnPInit2.
So it is time to remove this deprecated function.
As a result, also remove getlocalhostname and DEFAULT_INTERFACE which
are not needed anymore and replace UpnpInit by UpnpInit2 in comments.
Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com
I believe this would also solve my problem of specifying the correct interface. I have been trying to force squeeze2upnp on the right interface, even disabling interfaces, but nothing seems to help.
Running squeeze2upnp-x86-64 on a linux host with multiple network interfaces, squeeze2upnp runs on the wrong interface:
start with
-b 192.168.0.1:49153
, also reported in log fileBinding to 192.168.0.1:49153 (http:49153)
using
tcpdump -i eth1 -s0 -vv host 239.255.255.250'
, it shows that squeeze2upnp is trying to run presence check on eth1:looking at the discussion to drop UpnpInit
would it be possible to implement UpnpInit2?
I believe this would also solve my problem of specifying the correct interface. I have been trying to force squeeze2upnp on the right interface, even disabling interfaces, but nothing seems to help.