Hi Gert,

On 21/05/15 20:14, Gert Doering wrote:
Hi,

On Wed, May 20, 2015 at 04:33:20AM +0200, Jan Just Keijser wrote:
here's my patch for bug #93: missing ifconfig_* env vars after
up-restart. Tested with both IPv4, IPv6, topology subnet and topology net30
Reading through #93, I'm wondering - what about the other environment
variables mentioned, like "route_gateway" etc.?

In other words, your patch looks like it will nicely fix the missing
ifconfig_* variables (by ensuring that what close_instance() destroyed
is re-initialized even if not calling init_tun() - and cleaning up that
one a bit while at it :-) ), but I wonder if more needs to be done?

I did look into that - a 'restart' occurs only if 'persist-tun' is used and in that case the routes are not re-added . If you look at the flow of code of 'do_open_tun' in init.c you'll see that all routing stuff is *not* re-run, hence those environment variables are not present anymore - but then again, the routes are still there, as the system routing tables were not affected because the tun device was never closed in the first place.

My guestimation was that there are no other *important* env vars that get lost during a soft restart.

JJK


Reply via email to