]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
forecast: Ignore per-CPU CHILD_SAs
authorTobias Brunner <tobias@strongswan.org>
Mon, 31 May 2021 13:21:46 +0000 (15:21 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 28 May 2025 14:35:26 +0000 (16:35 +0200)
Not sure if this combination does make sense as the plugin itself would
be a major bottleneck.

Similar to the connmark plugin, PREROUTING rules list SPIs or UDP ports,
which would be necessary for all SAs while the OUTPUT rules would only be
required once.

src/libcharon/plugins/forecast/forecast_listener.c

index 4983835f1914b376dbe68e85ef81f307b239c36a..3d000bc48c27ce6d860b0c781b7172cc1588e619 100644 (file)
@@ -500,7 +500,8 @@ static bool commit_handle(struct iptc_handle *ipth)
 static bool handle_sa(child_sa_t *child_sa)
 {
        return child_sa->get_mark(child_sa, TRUE).value &&
-                  child_sa->get_mark(child_sa, FALSE).value;
+                  child_sa->get_mark(child_sa, FALSE).value &&
+                  !child_sa->use_per_cpu(child_sa);
 }
 
 METHOD(listener_t, child_updown, bool,