UPnP client port randomize

This commit is contained in:
Peter Šurda 2018-02-13 16:11:53 +01:00
parent f9a648d720
commit 96ea36cfd2
Signed by untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -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