Opened 9 years ago

Closed 9 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.

Change History (1)

comment:1 in reply to:  description Changed 9 years ago by David Sommerseth

Resolution: notabug
Status: newclosed

Replying to svimik:

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.

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.

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.

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.

If the update is delayed intentionally (why?), let it be a feature wish to update it immediately.

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.

Note: See TracTickets for help on using tickets.