pupnp / pupnp

libupnp: Build UPnP-compliant control points, devices, and bridges on several operating systems.
https://pupnp.github.io/pupnp
BSD 3-Clause "New" or "Revised" License
352 stars 117 forks source link

Subcribe HTTP error 412 Precondition Failed, when in case of private network multicast routing scenario. #379

Open qrandar opened 2 years ago

qrandar commented 2 years ago

In a multicast routing environment, the UPnP connections fails with error 412, Precondition Failed. This issue can be related to the "Partial fix for CallStranger on IPv4" #181".

Using "Gerbera" v1.9.2 which is a UPnP Media Server, which is using "pupnp", release 1.14.12. The LG television is failing to connect to the Gerbera UPnP Media Server. The television is failing with HTTP error code 412, Precondition Failed.

The UPnP Media server has IP address: 192.168.10.34/24, GW 192.168.10.1 The LG television has IP IP address: 192.168.27.65/24, GW 192.168.27.1 There is a multicast enable router, connecten both networks.

When the LG television send a subscribe to the UPnP server. The UPnP server answered with HTTP error 412, Precondition Failed.

From the; Open Connectiviy Foundation, doucment: UPnP-arch-DeviceArchitecture-v2.0-20200417.pdf

The subscription request containing a delivery URL not on the same network segment as the fully qualified event subscription URL shall not be accepted. For private networks this means that the delivery URL provided will adhere to the following IP ranges: • 10.0.0.0 - 10.255.255.255 (10/8 prefix) • 172.16.0.0 - 172.31.255.255 (172.16/12 prefix) • 192.168.0.0 - 192.168.255.255 (192.168/16 prefix)

The sentence "For private networks this means that the delivery URL provided will adhere to the following IP ranges". Should pupnp not check the private range prefix; 10/8 or 172.16/12 or 192.168/16, instead of the same network segment? This for the private networks?!