Hi,
On Sat, Jun 11, 2016 at 12:57 PM, Chris Laif <chris.l...@googlemail.com>
wrote:
> > I'm open to adding support for $, but would avoid using an _optional_
> second
> > option-filter because of how missing quotes will change the meaning.
> >
>
> I'm probably misunderstanding you, so I'm trying to explain my
> thoughts with some other words:
>
> Usage: --pull-filter accept|reject "openvpn-option-name"
> "filter-string-for-that-option"
>
> - "pull-filter" requires three arguments, exits with error otherwise
> - 1st option needs to be string "accept" or "reject"
> - 2nd option needs to be a valid openvpn option name, detected by the
> same logic openvpn parses the configuration file (I don't exactly
> know, but I think whitespace are stripped). Exits with error if no
> valid openvpn option name which is allowed to be filtered (for now:
> "ifconfig" and "route", more maybe later) is detected
> - 3rd option defines the filter for that option name (prefix-style
> filter for now, maybe some regex-style filter sometime later)
>
> I think this would be a very clean solution because the system checks
> if the 2nd option unambiguously describes which option is to be
> filtered (and also checks if this option is able to be filtered at
> all).
If both parameetrs are mandatory, then the objection I had doesn't apply.
But such an approach would be identical to what we have now except that the
first word is checked against valid option names. Such an added check may
have some merit, though very difficult to do in the current code. Even if
we somehow implement that, the user can still mistype/misquote the second
word. I don't see how this is any less error-prone.
And, the usage can get very awkward in some cases. For example, suppose I
want to ignore --register-dns (this is a real example that I have started
using):
--pull-filter ignore register-dns
would become
--pull-filter ignore register-dns ""
Forget that "" and you get a parse error, type that as " " and the filter
will be accepted but wouldn't work.
Or try rewriting this one:
--pull-filter accept "ip-win32 dynamic "
--pull-filter ignore "ip-win32 "
That's why I call it an advanced option...
Selva
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Openvpn-users mailing list
Openvpn-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-users