Opened 6 years ago

Closed 6 years ago

#1123 closed defect (fixed)

Handle multiple UPnP devices better

Reported by: zzz Owned by: zzz
Priority: minor Milestone: 0.9.9
Component: router/transport Version: 0.9.8.1
Keywords: UPnP Cc:
Parent Tickets: Sensitive: no

Description

We currently take the first one we find and ignore the rest. As the first-to-respond is not deterministic, behavior on a computer with access to multiple UPnP devices (either on the same or different subnets; the realistic case is different subnets).

Need (at least) some advanced config to ignore certain ones or specify priority.

Even better, a GUI.

Even better, pick the "best" one algorithmically (the one that's on the default route, for example). But I'm sure that's hard. Maybe the one "closest" to our configured IP? But we don't usually have an IP configured.

Check freenet (limewire?) for any fixes they have done (the code came from them). Not likely though.

To maintain a reference to all devices found (rather than just discarding ones we don't like) would require significant rework in UPnP.java.

Subtickets

Change History (3)

comment:1 Changed 6 years ago by zzz

Example log:

xx:xx:16.618 WARN  [JobQueue 1/1] r.transport.ntcp.NTCPTransport: Received address: null:xxxx from: SOURCE_CONFIG
xx:xx:16.618 WARN  [JobQueue 1/1] r.transport.ntcp.NTCPTransport: Starting ntcp transport listening
xx:xx:17.037 WARN  [ponseSocket/] org.cybergarage.util.Debug    : Add root device
java.lang.Exception: received on 192.168.xx.xx
	at org.cybergarage.upnp.ControlPoint.addDevice(ControlPoint.java:260)
	at org.cybergarage.upnp.ControlPoint.searchResponseReceived(ControlPoint.java:526)
	at org.cybergarage.upnp.ssdp.SSDPSearchResponseSocket.run(SSDPSearchResponseSocket.java:78)
	at java.lang.Thread.run(Thread.java:724)
xx:xx:17.038 WARN  [ponseSocket/] net.i2p.router.transport.UPnP : UP&P IGD found : xxxxxx Router UDN: uuid:xxxxxxxxxxxxxxx lease time: 120
xx:xx:17.043 WARN  [ponseSocket/] net.i2p.router.transport.UPnP : xxxxxx Router doesn't seems to be using PPP; we won't be able to extract bandwidth-related informations out of it.
xx:xx:17.084 WARN  [ponseSocket/] org.cybergarage.util.Debug    : Add root device
java.lang.Exception: received on 192.168.yy.yy
	at org.cybergarage.upnp.ControlPoint.addDevice(ControlPoint.java:260)
	at org.cybergarage.upnp.ControlPoint.searchResponseReceived(ControlPoint.java:526)
	at org.cybergarage.upnp.ssdp.SSDPSearchResponseSocket.run(SSDPSearchResponseSocket.java:78)
	at java.lang.Thread.run(Thread.java:724)
xx:xx:17.084 WARN  [ponseSocket/] net.i2p.router.transport.UPnP : UP&P ignoring additional IGD device found: yyyyyy router UDN: uuid:yyyyyyyyyyyyyyyyyy
xx:xx:18.148 WARN  [JobQueue 1/1] ter.transport.udp.UDPTransport: Starting SSU transport listening

comment:2 Changed 6 years ago by zzz

Milestone: 0.9.120.9.9
Status: newaccepted

comment:3 Changed 6 years ago by zzz

Resolution: fixed
Status: acceptedclosed

Fixed in 0.9.8.1-24 0a9e37137968d793f6a1644eb653353f2345107a

  • Add new config i2np.upnp.ignore to specify UDNs of ignored devices
  • Add display of ignored devices on /peers
Note: See TracTickets for help on using tickets.