From: Martin Willi Date: Tue, 9 Nov 2010 09:19:09 +0000 (+0100) Subject: Ingore messages with exchange type altered to UNDEFINED in message() hook X-Git-Tag: 4.5.1~306 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c146c3c4e1c4de2aaa6bb08ab4705666e74b28bd;p=thirdparty%2Fstrongswan.git Ingore messages with exchange type altered to UNDEFINED in message() hook --- diff --git a/src/libcharon/sa/task_manager.c b/src/libcharon/sa/task_manager.c index 9b403a7415..6dda6d27a0 100644 --- a/src/libcharon/sa/task_manager.c +++ b/src/libcharon/sa/task_manager.c @@ -897,6 +897,10 @@ METHOD(task_manager_t, process_message, status_t, } } charon->bus->message(charon->bus, msg, TRUE); + if (msg->get_exchange_type(msg) == EXCHANGE_TYPE_UNDEFINED) + { /* ignore messages altered to EXCHANGE_TYPE_UNDEFINED */ + return SUCCESS; + } if (process_request(this, msg) != SUCCESS) { flush(this); @@ -938,6 +942,10 @@ METHOD(task_manager_t, process_message, status_t, } } charon->bus->message(charon->bus, msg, TRUE); + if (msg->get_exchange_type(msg) == EXCHANGE_TYPE_UNDEFINED) + { /* ignore messages altered to EXCHANGE_TYPE_UNDEFINED */ + return SUCCESS; + } if (process_response(this, msg) != SUCCESS) { flush(this);