suggestion for a new script trigger ; before "preresolve"?
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 14.6k
- Forks
- 3.4k
- PR merge metrics
- No merged PRs in 30d
Description
The current "up" script takes place quite late in the process.
In my setup I have a fairly complex set of tunnels, that I need to define and bride in advance.
Currently I do it with sytemd-netowkrd, but I cannot allow openvpn to create the tunnels dinamically as many other services in the machine are dependent on the tunel device.
In this context all the routing is handled without openvpn "äutomations", as there is quite a bit of network traffic mangling and balancing.
Under unexpected circumstances the tunel can fail connection leading to situations where the "up" script was executed but not the "down".
In this sense I have experienced situations where I need to do manual cleanups on the networking. To automate this, the only way is to have openvpn do not retry connections, exit the process, and a ExecStartPre in systemd...
But it would be much simpler having a script extension called within the openvpn process, before on each connection attempt.
I have not checked the code in detail, but probably it should take place in "init.c" init_instance(..) function and before the preresolve part.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading init.c and the init_instance(..) function, especially the existing preresolve path, to understand where connection attempts are initialized. Define the desired pre-connection hook behavior and verify its ordering and cleanup semantics against the existing up/down flow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100