On Thu, Feb 23, 2012 at 11:23:07AM -0500, Simon Deziel wrote:
> On 12-02-23 10:53 AM, Teodor MICU wrote:
> > 2012/2/22 Simon Deziel <simon.dez...@gmail.com>:
> >> On 12-02-22 08:38 AM, Teodor MICU wrote:
> >>> I like this idea. However, I think you should change a few things:
> >>> 1) default.send_redirects=0 and all.send_redirects=0 should be done
> >>> only if necessary (is not 0) and the original value reverted back
> >>> after the device was created
> >>
> >> Adding more logic would result in calling sysctl more times which is
> >> suboptimal IMHO unless there are some advantages I'm not aware of ?
> > 
> > This is not about "advantages" but for keeping the previous
> > configuration (default or explicitly set by the user). I saw you have
> > the logic for one but not for both.
> 
> I'm not sure what you imply by "both" here so I maybe missing your
> point. In the patch, 2 sysctl keys are altered: the default and the all
> ones.
> 
> The default is only altered to allow the tun to derive its own
> send_redirects based on the default one (that is to have it =0). Once
> the tun is up, the default is restored to its original value so in
> effect the user's setting is retained.
> 
> Now for the all key, this has to be =0 as otherwise the tun one wouldn't
> have any effect.
> 
> > That's why I though if you already have to get the current value why
> > not check if =0 to avoid two sysctl call for each parameter. Thus,
> > this would be more optimal.
> 
> OK, that would avoid uselessly calling sysctl -w to set/restore the
> default key to its current value when it is already disabled.
> 
> You convinced me, your suggestion is cleaner. Here is the fixed patch
> (which is now based on the Debian package as my previous ones were based
> on the one from Lucid).

Nice! If we all agree in -try5.diff, I'll apply it and upload the
package with the fix.

Thanks both!


-- 
Alberto Gonzalez Iniesta    | Formación, consultoría y soporte técnico
agi@(inittab.org|debian.org)| en GNU/Linux y software libre
Encrypted mail preferred    | http://inittab.com

Key fingerprint = 9782 04E7 2B75 405C F5E9  0C81 C514 AF8E 4BA4 01C3



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to