After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 697092 - rtspconnection: The "x-server-ip-address" header with wrong IP address is added to the GET response
rtspconnection: The "x-server-ip-address" header with wrong IP address is add...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 1.0.7
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-04-02 09:40 UTC by Ognyan Tonchev (redstar_)
Modified: 2013-04-04 10:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't add the x-server-ip-address header with the client's IP (1.23 KB, patch)
2013-04-02 09:47 UTC, Ognyan Tonchev (redstar_)
none Details | Review

Description Ognyan Tonchev (redstar_) 2013-04-02 09:40:17 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.
Comment 1 Ognyan Tonchev (redstar_) 2013-04-02 09:47:29 UTC
Created attachment 240368 [details] [review]
Don't add the x-server-ip-address header with the client's IP
Comment 2 Wim Taymans 2013-04-04 09:58:56 UTC
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.
Comment 3 Wim Taymans 2013-04-04 10:33:35 UTC
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