Opened 13 years ago
Closed 13 years ago
#166 closed Bug / Defect ( notabug )
ipp file: delayed update
| Reported by: | svimik | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | Generic / unclassified | Version: | |
| Severity: | Not set (select this one, unless your'e a OpenVPN developer) | Keywords: | |
| Cc: |
Description
When new client connects and gets local IP, ipp file is not updated.
Some external scripts may want to know IP address, and ipp file would be the easiest way to get it.
I can't find out, under which condition this file is updated. Sometimes I see new record in less than a minute, sometimes I can't get it even after few reconnects.
If the update is delayed intentionally (why?), let it be a feature wish to update it immediately.
Replying to svimik :
For instant updates, using the --learn-address script hook will give you this information as soon as a new IP address is taken in use.
From the man page:
--ifconfig-pool-persist file [seconds] Persist/unpersist ifconfig-pool data to file, at sec‐ onds intervals (default=600), as well as on program startup and shutdown.Also note that setting seconds=0 will not make it be updated instantly.
It is intentionally in the code, and the reason is that assigned IP addresses might not be taken in use instantly. Your feature request should be covered by using --learn-address instead.