]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Implement push-remove option to selectively remove pushed options.
authorGert Doering <gert@greenie.muc.de>
Mon, 16 May 2016 10:13:04 +0000 (12:13 +0200)
committerGert Doering <gert@greenie.muc.de>
Mon, 16 May 2016 18:25:06 +0000 (20:25 +0200)
commit970312f185012341cc5bcc9492ab3e1413c7b3c7
treeed44b9a93c48f70df243578e8808eddb7695f60e
parent3e42a558103e4e3f45ed28ccb761cefed20e8247
Implement push-remove option to selectively remove pushed options.

With this option, the server can remove individual options from the
set pushed to a client (call from --client-config-dir file, or from
--client-connect script or plugin).  Options are removed at parse
time, so it is possible to do stuff like:

  push-remove route-ipv6
  push "route-ipv6 fd00::/8"

to first remove all IPv6 route options set so far, then add something
specific (what "push-reset" does to all the options).

Arguments to push-remove are strncmp()'ed to option string, so partial
matches like

  push-remove "route-ipv6 2001:"

are possible ("remove all IPv6 routes starting with 2001:").

Implementation of remove_iroutes_from_push_route_list() had to be changed
slightly to stop it from re-enabling all disabled options again.

v2: documentation (Changes.rst, doc/openvpn.8)
    remove surplus gc_arena
    implement filtering of "ifconfig-ipv6"

v3: correct quoting in commit message
    only handle a single argument per push-remove statement - if multiple
    options are to be removed, just use multiple push-remove statements

Trac #29, #614

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <1463393584-8318-1-git-send-email-gert@greenie.muc.de>
URL: http://article.gmane.org/gmane.network.openvpn.devel/11665
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Changes.rst
doc/openvpn.8
src/openvpn/options.c
src/openvpn/options.h
src/openvpn/push.c
src/openvpn/push.h