Hi, On Thu, May 21, 2015 at 08:20:39PM +0200, Jan Just Keijser wrote: > On 21/05/15 20:14, Gert Doering wrote: > >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.
OK, so these get lost, but are set elsewhere, and would need an extra patch... > My guestimation was that there are no other *important* env vars that > get lost during a soft restart. Well, what's important to some is not to others (I could care less about "ifconfig_local", as tun.c does that for me :-) )... this ticket is all about consistency, *or* documenting that --up-restart will not see the environment variables that --up has "because you do not need them"... I'm not sure what the best path forward is, TBH... gert -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany g...@greenie.muc.de fax: +49-89-35655025 g...@net.informatik.tu-muenchen.de
pgp9beTc9PhUD.pgp
Description: PGP signature