GNOME Bugzilla – Bug 697092
rtspconnection: The "x-server-ip-address" header with wrong IP address is added to the GET response
Last modified: 2013-04-04 10:33:35 UTC
When setting up a tunnel on the server side the "x-server-ip-address" header with the IP address of the other end(the client) is added to the GET reponse. Which instructs the client to redirect the POST request to it's own host. I noticed the problem when running gst-rtsp-server on a host different than localhost.
Created attachment 240368 [details] [review] Don't add the x-server-ip-address header with the client's IP
The problem is elsewhere, in _accept() it should store the server socket address in the conn->ip so that it can add it correctly. Currently it stores the remote address there.
commit a4e44df6b9727f1f9a26da5774179d402b05b8f0 Author: Wim Taymans <wim.taymans@collabora.co.uk> Date: Thu Apr 4 12:32:24 2013 +0200 rtsp: make local_ip and remote_ip variables Separate local_ip and remote_ip into separate variables for clarity. commit 4826ec4e4d40dd3c793d3dda9d0aedb9b4c39d46 Author: Wim Taymans <wim.taymans@collabora.co.uk> Date: Thu Apr 4 12:16:47 2013 +0200 rtsp: calculate the local ip address in accept Calculate the local IP address in the accept call. We need to place this IP address in the GET reply in the X-Server-IP-Address header so that the client knows where to send the POST to in case of tunneled RTSP. Before this patch it used the client IP address, which would make the client send the POST request to itself and fail. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=697092