[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

Luca Abeni lucabe72
Tue Sep 28 09:11:59 CEST 2010


Hi Martin,

On 09/27/2010 06:13 PM, Martin Storsj? wrote:
> On Mon, 27 Sep 2010, Sam Creasey wrote:
>
>> This patch looks somewhat (though not entirely) related to issue 1688,
>> though I'm attempting to solve a slightly different problem that that
>> author proposed.
>>
>> The current ffmpeg source does not look at the source address of
>> incoming udp/rtp packets (udp uses recv() instead of recvfrom(),
>> rtpproto uses recvfrom() and discards the from).  This patch would
>> check the remote address to match the address from udp_set_remote_url,
>> and reject the packet unless
>>
>> *) the specified address was a multicast address
>> *) the address family is ipv4 or ipv6, and the address and port match
>> *) the address family is something else (unlikely for udp/rtp, but
>> might as well let through things we don't know how to test).
>
> This looks quite sensible to me.
>
> Luca A, Luca B, Ronald, do you think of any situations where this wouldn't
> be appropriate?

If it does not break things, I am ok with it...
I have no time to test, but the patch submitter should check both RTSP and
SDP, with unicast and multicast (and I _suspect_ this patch might break
unicast SDP), with private and public IP addresses (to make sure that
there are no problems with NAT and similar stuff...).

> Do we need an option for disabling this?

If it breaks something, I think yes (maybe a better idea would be an option
for enabling this feature, leaving the default to disabled).


				Luca



More information about the ffmpeg-devel mailing list