[FFmpeg-devel] [PATCH] Add code in rtpproto.c/udp.c to test incoming packets against the host/port looked up in rtp/udp_set_remote_url
Tue Sep 28 09:24:40 CEST 2010
On 09/27/2010 06:24 PM, Martin Storsj? wrote:
> I read through the issue on roundup, and this is by far the most sane way
> of solving that issue, it also is quite the same as one thing Luca A
> suggested in that thread:
>> If you want to discard packets coming from a "wrong" address, maybe the
>> simplest thing to do is to modify udp.c to use recvfrom(), and to
>> compare the source address with the address that has been specified
>> through udp_set_remote_url().
> And that is exactly what this patch does.
Well, I do not remember all the details of the roundup issue, but if
someone wants to discard packets coming from a wrong IP, this looks
ok... The problem is: what about people that do not want to discard
any packet? And, are we sure that udp_set_remote_url() is not called
with a wrong address (for example, the local address)? For example,
I have a bad feeling about things like "rtp://localhost:10000"...
I suspect this would result in accepting only packets coming from
> I do agree that there might be cases where the remote IP isn't known, but
> this seems to be solved by using e.g. rtp://0.0.0.0:4242/ in the patch
The problem is: assume that my computer has 2 different network cards,
eth0 and eth1, and the address of eth0 is 192.168.10.20. If I want to
receive RTP traffic on port 4242 of eth0, I think the right URL would
be rtp://192.168.10.20:4242, or similar... Using 0.0.0.0:4242 would
result in receiving packets from both eth0 and eth1.
More information about the ffmpeg-devel