]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Extend push-remove to also handle 'ifconfig'.
authorGert Doering <gert@greenie.muc.de>
Sun, 1 Jul 2018 19:59:38 +0000 (21:59 +0200)
committerGert Doering <gert@greenie.muc.de>
Mon, 2 Jul 2018 06:24:34 +0000 (08:24 +0200)
commit6ae2f19d891e8cedccffdb1760b9774b9feff140
treeb7d0336cb7e57fd44ade897bf8064f4ec5a6ba24
parent1987498271abadf042d8bb3feee1fe0d877a9d55
Extend push-remove to also handle 'ifconfig'.

Push-remove (introduced in commit 970312f1850) did not handle "ifconfig"
yet, as both "ifconfig" and "ifconfig-ipv6" are handled differently from
all other pushed options.  Since there was no valid use-case to not-push
"ifconfig" (no support on the client side for running IPv6-only) this
was not an issue so far - but with the recent commits to enable ipv6-only
operation it can be a desirable feature.

The implementation is similar to "push-remove ifconfig-ipv6" - namely,
flagging via a new context option (c->options.push_ifconfig_ipv4_blocked)
and then not creating the push statement in "send_push_reply()".

While not truly elegant, it's much less invasive than the alternatives
(storing the list of "push-remove" statements somewhere and then checking
in push_option_ex())

Trac: #1072

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Antonio Quartulli <antonio@openvpn.net>
Message-Id: <20180701195938.2541-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg17169.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
doc/openvpn.8
src/openvpn/options.h
src/openvpn/push.c