|
|
Claas Hilbrecht <claas+maillinglists.openvpn@xxxxxxxxxxxxxxxxx> said: > >> > I wonder how can I use resolv-retry with an unlimited number of > >> > retries? Is this possible at all? > >> > >> The following two patches allow resolv-retry to work forever if you call > >> openvpn with "resolv-retry=-1". Maybe the patch could be added to the > >> next openvpn release? > > > > Why not just use a big number for the resolv-retry parameter, like a > > month or a year? > > I think that "missusing" a parameter to achieve a desired behaviour is > common with software that is closed source. But with open source software I > think it's better to create a patch. Using the documented -1 value with > resolv-retry every one knows "ok, this should try as long as hell freezes" > but using a large resolv-retry number this could mean something else, e.g. > "Maybe I need to work around another piece of broken software?". I hear where you're coming from, but I beg to disagree. I think that when you have a positive integer parameter that refers to some kind of real-world measurement (such as a number of seconds in a time interval), that it confuses the matter by making special case values (such as -1, -2, etc.) that change the way the parameter is interpreted from a time interval to a binary flag. I know this is done in C programming all the time, in terms of the way that programs operate internally, but I'm a bit reluctant to export this to the user interface because then it needs to be documented that 4 means 4 seconds and 100 means 100 seconds but -1 means infinity seconds. My preferred solution would be something like "--resolv-retry infinite" (since there is no infinity character in ASCII), and have the options parser internally substitute a very large number when "infinite" is used. Then if someone looks at a config file, they see "infinite" and it's obvious what it means. On the other hand if you see "--resolv-retry -1", then you have to remember that -1 is really a special-case flag and then you need to check the manual to remember whether -1 is infinite and 0 disables or whether 0 is infinite and -1 disables, etc. James ____________________________________________ Openvpn-users mailing list Openvpn-users@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/openvpn-users |