trap-manager: Compare peer config name during installation
authorTobias Brunner <tobias@strongswan.org>
Fri, 3 Nov 2017 10:26:23 +0000 (11:26 +0100)
committerTobias Brunner <tobias@strongswan.org>
Thu, 22 Feb 2018 10:31:05 +0000 (11:31 +0100)
src/libcharon/sa/trap_manager.c

index 012f0fe..88e6bb2 100644 (file)
@@ -255,7 +255,9 @@ METHOD(trap_manager_t, install, uint32_t,
        enumerator = this->traps->create_enumerator(this->traps);
        while (enumerator->enumerate(enumerator, &entry))
        {
-               if (streq(entry->name, child->get_name(child)))
+               if (streq(entry->name, child->get_name(child)) &&
+                       streq(entry->peer_cfg->get_name(entry->peer_cfg),
+                                 peer->get_name(peer)))
                {
                        found = entry;
                        if (entry->child_sa)