]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Handle all error notifies in CREATE_CHILD_SA exchanges
authorMartin Willi <martin@revosec.ch>
Wed, 10 Nov 2010 15:30:25 +0000 (16:30 +0100)
committerMartin Willi <martin@revosec.ch>
Wed, 5 Jan 2011 15:45:44 +0000 (16:45 +0100)
src/libcharon/sa/tasks/child_create.c

index f971f885962e8ab84431707105bef1dfe5f72f1d..02831b0047883f4be559e8a0b13bbd03ed37a521 100644 (file)
@@ -1110,7 +1110,21 @@ METHOD(task_t, process_i, status_t,
                                        return NEED_MORE;
                                }
                                default:
+                               {
+                                       if (message->get_exchange_type(message) == CREATE_CHILD_SA)
+                                       {       /* handle notifies if not handled in IKE_AUTH */
+                                               if (type <= 16383)
+                                               {
+                                                       DBG1(DBG_IKE, "received %N notify error",
+                                                                notify_type_names, type);
+                                                       enumerator->destroy(enumerator);
+                                                       return SUCCESS;
+                                               }
+                                               DBG2(DBG_IKE, "received %N notify",
+                                                        notify_type_names, type);
+                                       }
                                        break;
+                               }
                        }
                }
        }