Opened 9 years ago
Closed 9 years ago
Last modified 9 years ago
#12333 closed Patch - Bug Fix (fixed)
SSDP (uPNP) requests ignored
Reported by: | Owned by: | dblain | |
---|---|---|---|
Priority: | minor | Milestone: | 0.27.5 |
Component: | MythTV - UPnP | Version: | 0.27.4 |
Severity: | medium | Keywords: | uPNP SSDP |
Cc: | Ticket locked: | no |
Description
I am running a system with mythtv 0.27.4. Also on my LAN are two DirecTV satellite boxes and a PS3 which I use as a uPNP client. The DirecTV boxes send a spew of IGMP reports, one of which is from a spoofed IP address that's outside my LAN subnet. This triggers the "SSDP Reflection attempt" protection in patch 52cb0b5.
After that, all subsequent uPNP queries are ignored until I restart mythbackend. Specifically for me, this meant my PS3 would not recognize the mythtv server.
I tried patching ssdp.cpp with the latest patches, d20c163 and 02e92a2, and this caused all uPNP queries to be ignored (but a quieter logfile). But the last of these all but disables the previous protection patch. The only remaining effect was to move the assigments of:
QHostAddress peerAddress = pSocket->peerAddress(); quint16 peerPort = pSocket->peerPort ();
outside of a loop over individual packets. I played with this a bit, putting the assignment back inside the packet loop, and came up with a solution that enables the protection code but does not disable future SSDP responses. I'm no expert with mythtv code, but what I have seems basically reasonable and appears to work well.
Attachments (1)
Change History (5)
Changed 9 years ago by
Attachment: | ssdp.patch added |
---|
comment:1 follow-up: 2 Changed 9 years ago by
That commit was reverted over a week ago. Have you tried upgrading to the latest -fixes?
comment:2 Changed 9 years ago by
Replying to stuartm:
That commit was reverted over a week ago. Have you tried upgrading to the latest -fixes?
Yes, I tried mythtv built with ssdp.cpp patched to the most recent commit 02e92a2. This no longer reported "SSDP Reflection attempt" messages, but it also failed to respond to any SSDP discovery requests. I tried two uPnP clients (PS3 and an Android app) without success. They do not see the mythtv box.
Commit 02e92a2 mostly reverts 52cb0b5, but still leaves the code (quoted in the original ticket) out of place, and still causes this uPnP regression on my system.
I might be seeing a bug that requires other network elements to trigger, specifically a class of satellite box that sends out bursts of SSDP announcements every minute. It's possible that this triggers the bug by putting multiple packets in the socket buffer at the time SSDP::ProcessData?() is called.
comment:3 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 Changed 9 years ago by
Milestone: | unknown → 0.27.5 |
---|
patch against libs/libmythupnp/ssdp.cpp, v 0.27.4