]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Ingore messages with exchange type altered to UNDEFINED in message() hook
authorMartin Willi <martin@revosec.ch>
Tue, 9 Nov 2010 09:19:09 +0000 (10:19 +0100)
committerMartin Willi <martin@revosec.ch>
Wed, 5 Jan 2011 15:45:42 +0000 (16:45 +0100)
src/libcharon/sa/task_manager.c

index 9b403a74158a99a412cca3c8ef4067f83dea3cd5..6dda6d27a083a805d3ba2a744dd8acbdf064c31d 100644 (file)
@@ -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);