]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Stop complaining about IPv6 routes without gateway address.
authorGert Doering <gert@greenie.muc.de>
Wed, 5 Dec 2018 21:40:37 +0000 (22:40 +0100)
committerGert Doering <gert@greenie.muc.de>
Tue, 18 Dec 2018 14:33:38 +0000 (15:33 +0100)
commit14d7e0e496f15563005fffc6d4791a95444ddf23
treec6a60c1727302a25dcd825962581cf4c2f2b3781
parent4543b13b8540836f6faf67a03b5358bb8bb94a4a
Stop complaining about IPv6 routes without gateway address.

The IPv6 routing code inherited assumptions and the message

   "OpenVPN ROUTE6: OpenVPN needs a gateway parameter for a --route-ipv6
    option and no default was specified by either --route-ipv6-gateway or
    --ifconfig-ipv6 options"

from the IPv4 routing code.

This was never really correct, as no gateway is needed for "into tun
device" IPv6 routes, and the "--route-ipv6-gateway" option it refers
to also never existed.  (Routes on tap interfaces *do* need a gateway
due to neighbour discovery being involved.  As do routes on Windows,
but there we fake the gateway in tun mode anyway).

While commit d24e1b179b95 introduces support for "--route-ipv6-gateway",
the message is still falsely triggered for IPv6 routes in tun mode.

Change the code to generally accept IPv6 routes with no gateway
specification (so "--block-ipv6 --redirect-gateway ipv6" can work
without additional config).  When installing IPv6 routes, check
if a gateway is needed (tap mode) but missing, and if yes, print
correct message.

Trac: #1143

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Antonio Quartulli <antonio@openvpn.net>
Message-Id: <20181205214037.70783-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg17990.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/route.c