[mythtv-commits] Ticket #12333: SSDP (uPNP) requests ignored

MythTV noreply at mythtv.org
Thu Dec 11 05:31:14 UTC 2014

#12333: SSDP (uPNP) requests ignored
     Reporter:  tcawlfield@…     |      Owner:  dblain
         Type:  Patch - Bug Fix  |     Status:  new
     Priority:  minor            |  Milestone:  unknown
    Component:  MythTV - UPnP    |    Version:  0.27.4
     Severity:  medium           |   Keywords:  uPNP SSDP
Ticket locked:  0                |
 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
 #diff-2c2f248c000955e4e20a2737830aef3d 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.

Ticket URL: <https://code.mythtv.org/trac/ticket/12333>
MythTV <http://www.mythtv.org>
MythTV Media Center

More information about the mythtv-commits mailing list