Hello, I don't understand why it is needed. You can always start openvpn and override configuration via command-line.
So add --local "$(/sbin/ip addr show dev wlan0 | grep inet | sed 's#.*inet \(.*\)/.*#\1#')" parameter while starting it. A more generic approach can be adding $() support into openvpn options handling, so you can execute any command and put its output as a value of substring option. Alon. On Tue, Mar 8, 2011 at 11:52 PM, Federico Heinz <fhe...@gmail.com> wrote: > > Author: Federico Heinz <fhe...@gmail.com> > > Accept "local if:<ifname>" option. > > The current 'local' configuration directive allows for two types of > values: IP addresses and DNS hostnames. This is not enough for users > of dynamic DNS services who must restart OpenVPN when their IP > address changes, because their new IP address may not have progagated > yet through DNS when OpenVPN starts, and so they may end up binding > to a bogus address. > > This patch introduces a parameter notation that helps solve the > problem: if the option parameter is of the form "if:<ifname>", it > will determine the IP address of the interface and use that as the IP > address to bind to. > > The patch is small, and meant to be mininally intrusive: instead of > adding a new option and/or new code paths to handle the new case, it > simply replaces the value supplied by the user by a string > representing the IP address, as if the user had entered it. > > I'm not entirely sure I'm using gc_malloc() correctly, and I'd > appreciate feedback on that. > > Signed-off-by: Federico Heinz <fhe...@gmail.com> > > ------------------------------------------------------------------------------ > What You Don't Know About Data Connectivity CAN Hurt You > This paper provides an overview of data connectivity, details > its effect on application quality, and explores various alternative > solutions. http://p.sf.net/sfu/progress-d2d > _______________________________________________ > Openvpn-devel mailing list > Openvpn-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openvpn-devel >