From 96ea36cfd245f7dc10209b01278b5fa2970f360c Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Tue, 13 Feb 2018 16:11:53 +0100 Subject: [PATCH] UPnP client port randomize --- src/upnp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/upnp.py b/src/upnp.py index ff657619..ad72560c 100644 --- a/src/upnp.py +++ b/src/upnp.py @@ -187,7 +187,7 @@ class uPnPThread(threading.Thread, StoppableThread): self.localIP = self.getLocalIP() self.routers = [] self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) - self.sock.bind((self.localIP, 10000)) + self.sock.bind((self.localIP, 0)) self.sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 2) self.sock.settimeout(5) self.sendSleep = 60