[Live-devel] RTSP server extending
Gustaf Räntilä
opera at kth.se
Mon Apr 23 02:58:23 PDT 2007
Ross Finlayson wrote:
>> On 10/04/07, Vlad Seryakov <vlad at crystalballinc.com> wrote:
>>
>>> I may use it in the closed network environment where i do not
>>> authenticate by user name only but using IP address and/or MAC address
>>> in addition.
>>>
>> I faced the same problem where the server should reject clients based
>> on the camera url-ip address. The solution was to patch RTSPServer
>> class to add to it the following function:
>>
>> virtual Boolean checkClientAccess(int clientSocket, char const* urlSuffix);
>>
>> The default implementation returns true meaning that there is no
>> restrictions on cleints. A subclass can override it to return false
>> under some conditions. In that case RTSPServer replies with 401
>> Unauthorized without setting any digest headers.
>>
>
> Thanks for the patch.
>
> I have now added your patch to the code (although I changed the name
> of your function to "specialClientAccessCheck"), and have included it
> in a new release (2007.04.20) of the "LIVE555 Streaming Media"
> software.
>
The patch provided in this thread introduces control for authenticating
a certain socket to a certain url suffix which is useful. I've made a
similar patch, and I'm grateful that I can now remove half of it. The
other half of mine remains..
What I'm missing in this patch is control to accept or deny incoming
connections (before the RTSPClientSession object is created) based on
the IP/port.
The provided patch doesn't handle this, so a connection (and thereby an
RTSPClientSession) is always created for all IP/port's, which might not
be a desirable behavior.
If there is interest for a patch which provides this, through another
virtual function, let me know, and I'll send it in.
Gustaf
More information about the live-devel
mailing list