]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
child-create: Raise an ALERT_TS_MISMATCH when receiving TS_UNACCEPTABLE
authorMartin Willi <martin@strongswan.org>
Wed, 24 Sep 2025 13:15:03 +0000 (15:15 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 2 Oct 2025 08:22:36 +0000 (10:22 +0200)
When sending a TS_UNACCEPTABLE notify, a ALERT_TS_MISMATCH is sent, but
not when receiving one. This seems inconsistent compared to proposal
mismatch handling, so extend the child_create task to raise such an alert.

src/libcharon/sa/ikev2/tasks/child_create.c

index 29c4c495df6a4d3ec0e7b958acdcbb1b9f377d04..37575f57fd1cb23f4e9636d0353f83b016440c48 100644 (file)
@@ -2490,6 +2490,10 @@ static void raise_alerts(private_child_create_t *this, notify_type_t type)
                        charon->bus->alert(charon->bus, ALERT_PROPOSAL_MISMATCH_CHILD, list);
                        list->destroy_offset(list, offsetof(proposal_t, destroy));
                        break;
+               case TS_UNACCEPTABLE:
+                       charon->bus->alert(charon->bus, ALERT_TS_MISMATCH,
+                                                          this->tsi, this->tsr);
+                       break;
                default:
                        break;
        }