![]() Moderator ![]()
|
OK the D-LInk stuff seems to parse fine with the current SVN version.
Well simply put UPnP goes like this : - KT broadcasts a packet to discover all InternetGatewayDevices on the network - A UPnP device which thinks this applies to him sends back a response - KT will download the xml description of all UPnP devices which have responded and it will try to parse that I don't know why twonky responds, it is not an InternetGatewayDevice. |
![]() Registered Member ![]()
|
I've played around a bit, and read up on UPNP device discover at http://www.upnp.org/download/UPnPDA10_20000613.htm
Must say, am finding this good fun... Anyway, After checking, I don't think Twonky is actually responding to the dicovery search request that KT sends out - just seems Twonky advertises itself many times and the UPNP plugin finds it.. I think what's happening is the following: 1, KT broadcasts a search discovery 2, KT then listens for any responses 3. Twonky or other upnp sends a discovery advertise broadcast 4. KT detects it and attempts to process. The problem is that in a UPNP network, any device can send an advertise broadcast. KT on receiving any response should parse it to ensure a) it's in response to it's search broadcast and b) it is actually an Internet Gateway that is responding. What makes me think this... - well my router responds to the discovery search broadcast with a valid search target (ST:) field. This is correct behaviour in response to a discovery search. Twonky on the other hand is sending no ST: field, but is sending a notification type (NT:) field which is correct for discovery advertisement broadcasts. Simple solution... while parsing the response for location and server - parse it for a line which starts with ST and contains "InternetGatewayDevice". e.g.
Only if this check is valid should KT add the server to the routers - otherwise discard it.
To be honest - this still lets a lot of stuff get through to the log - i.e. KT still parses invalid devices. A more logical, but time consuming, thing to do is check for the response up front, and only if it's a valid device parse the response fully, e.g.
By doing this KT enforces itself to check for only responses it requested. RikD. |
![]() Moderator ![]()
|
Registered users: bancha, Bing [Bot], Google [Bot], Sogou [Bot]