← Back to Pull requests

strongswan: support /var/swanctl/conf.d/*.conf #22717

Open
hgl opened this pull request with 3 lines diff across 2 files
View on GitHub
hgl hgl commented on Nov 21, 2023 03:18 UTC
Author

Maintainer: @pprindeville @Thermi
Compile tested: x86 master
Run tested: x86 master

Description:

Sometimes, users might want to generate dynamic conf files. One example would be creating a IPv6 pool using WAN PD that might change. Currently, only /etc/swanctl/conf.d/*.conf is supported for user conf files, but it's not a good fit for dynamic ones, since upon rebooting the device, the conf can become stale.

With this change, users, for example, can use hotplug to create the conf in /var/swanctl/conf.d and have swanctl correctly load it.

They could of course add the include directive in
/etc/swanctl/swanctl.conf, but then they have to also remember creating the /var/swanctl/conf.d directory before every generation of the dynamic conf, which can be cumbersome. Given OpenWrt's popularity in home network, direct support for dynamic user conf files should be desirable.

Diff: 3 lines (+2 / -1) across 2 files Reviewer: pprindeville Review duration: 1595596m
All Vouch review confidence checks passed
Residual risk 0.03 = Change Risk (0.20) × (1 − Review Confidence (0.84)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.20 · 3 lines diff across 2 files
0.20
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.88 · 5 substantive comment(s)
0.88
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
84%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.083
Real PR Conversation Timeline
16 items
pprindeville pprindeville commented on code on Nov 27, 2023 04:25 UTC
Code Review
net/strongswan/files/swanctl.init:1
@@ -654,6 +654,8 @@ config_ipsec() {
 }
 
 do_postamble() {
+	swanctl_xappend0 "include /var/swanctl/conf.d/*.conf"

Why before the files in /etc and not after?

hgl hgl commented on code on Nov 27, 2023 06:39 UTC
Code Review
net/strongswan/files/swanctl.init:1
@@ -654,6 +654,8 @@ config_ipsec() {
 }
 
 do_postamble() {
+	swanctl_xappend0 "include /var/swanctl/conf.d/*.conf"

swanctl_xappend0 manipulates /var/swanctl/swanctl.conf, lines down below modifies /var/ipsec/strongswan.conf, I'm not sure I understand what files /etc are you referring to?

hgl hgl commented on Nov 28, 2023 14:18 UTC
Author

@pprindeville I've moved the include directive to Makefile, hope that's a better place for this logic.

pprindeville pprindeville requested changes on Dec 07, 2023 22:44 UTC
Changes Requested Reviewer

Needs PKG_RELEASE bump.

hgl hgl commented on Dec 15, 2023 04:27 UTC
Author

Since I bumped in the other PR, do you think this PR can be merged with the other PR? Bumping at both can create conflicts.

BKPepe BKPepe commented on Dec 18, 2023 22:27 UTC
Contributor

Conflicts can not be resolved? They can, so bump the version and lets merge this one.:-)

hgl hgl commented on Dec 19, 2023 01:06 UTC
Author

Once https://github.com/openwrt/packages/pull/22716 is merged, this one should be directly mergeable.

1715173329 1715173329 commented on Feb 20, 2024 05:53 UTC
Contributor

please rebase this PR, thanks!

zcracker zcracker commented on Feb 21, 2024 02:53 UTC
Contributor

please rebase this PR

Neustradamus Neustradamus commented on Oct 27, 2024 15:02 UTC
Contributor

@hgl: Any progress on your PR?
Soon one year...

Thermi Thermi commented on Mar 24, 2025 21:35 UTC
Contributor

@hgl does the PR still work?

pprindeville pprindeville requested changes on May 24, 2025 16:45 UTC
Changes Requested Reviewer

And a PKG_RELEASE bump and I'll merge it.

pprindeville pprindeville commented on Nov 27, 2025 21:30 UTC
Contributor

And a PKG_RELEASE bump and I'll merge it.

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @hgl

BKPepe BKPepe commented on Jun 24, 2026 20:32 UTC
Contributor

Kind remidner, @hgl

dhrm1k dhrm1k commented on Jun 25, 2026 19:42 UTC
Contributor

I noticed this only seems to be waiting on PKG_RELEASE bump now.

I can send a small follow-up PR with the same change rebased on current master
and the release bump included. I have played a bit with ipsec
recently too, so I’d be glad to help move this forward.

Reviewers
Assignees
hgl hgl
Labels
risk: low confidence: 84.4% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 19.8% (LOW) · Higher = larger blast radius
19.8%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 84.4% · Lower = rushed or shallow review
84.4%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 3.1% · Safe to merge
3.1%