Check for the duplciate service being the same as the service that is using the

tee filter. I.e. trap simple recursive definitions.
This commit is contained in:
Mark Riddoch
2014-12-11 13:45:21 +00:00
parent c75ba90f6f
commit 573cf6040c

View File

@ -280,6 +280,13 @@ TEE_INSTANCE *my_instance = (TEE_INSTANCE *)instance;
TEE_SESSION *my_session;
char *remote, *userName;
if (strcmp(my_instance->service->name, session->service->name) == 0)
{
LOGIF(LE, (skygw_log_write_flush(LOGFILE_ERROR,
"%s: Recursive use of tee filter in service.",
session->service->name)));
return NULL;
}
if ((my_session = calloc(1, sizeof(TEE_SESSION))) != NULL)
{
my_session->active = 1;