Hi,

Failed to respond to some other points in the last reply:

>>
>> Did some quick tests and this seems to work quite well (but see the
>> note at the bottom):
>>
>> - v4 routes via tun just fail with a warning which is good (our route
>> errors not being FATAL pays off here)
>> - v4 routes via net_gateway just works : no idea why we support this,
>> but good to see this patch doesn't break it
>> - redirect-gateway causes warnings as v4 routes fail:
>>   If its not too hard could we check !tt->did_ifconfig_setup before
>> attempting v4 redirect? Saying this because "--redirect-gateway with
>> no options automatically implies ipv4" is just a hangover from the
>> past that we are stuck with. For other routes it may be harder to
>> detect whether its via the tun or not so just letting them error out
>> is fine. And those warnings provide useful feedback to the user.
>>
>
> Don't you think it's still meaningful to print the warning? somebody is
> asking for a redirect that does not make sense because there is no v4
> configured and the config should be adjusted. No?

When you put it that way, yes. But interpreting redirect-gateway with
no arguments to mean redirect ipv4 is something we have to live with
just because of backward compatibility. In that sense its different
from an explicit ipv4 route in the config. Being a bit more helpful
and interpret it as !ipv4 when no v4 address is present looks like a
nice touch? So I would say, a warning saying redirect v4 is skipped is
useful but letting those routes error out is not.

But unlike I may sound, I do not have a strong feeling about this --
works either way for me.

>
>> A minor thing:
>>
>> - The warning
>> "WARNING: OpenVPN was configured to add an IPv4 route. However, no
>> IPv4 has been configured for this interface, therefore the route
>> installation may fail or may not work as expected."
>> is printed without the M_WARN flag  --- so syslog won't see it as a
>> warning nor does the GUI. M_INFO|M_WARN will make it print at verb > 0
>> with the warning tag. If that sounds like a strange combination,
>> invent a warning level like D_GENERIC_WARNING = LOGLEV(1,0,M_WARN). We
>> don't have one.
>>
>
> you are the master of the log levels, therefore I'll just follow your
> suggestion, unless somebody else objects.

Personally I do not like M_WARN|M_INFO but that's the best I can think
of to get the warning tag and print only if verb > 0.

Thanks,

Selva

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to