]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Repair topology subnet on OpenBSD
authorGert Doering <gert@greenie.muc.de>
Wed, 9 Nov 2016 20:19:32 +0000 (21:19 +0100)
committerDavid Sommerseth <davids@openvpn.net>
Fri, 11 Nov 2016 11:35:29 +0000 (12:35 +0100)
commit7f444dee52321c0f0294e99695150a7f69522715
tree378ec2fa76a6e5a057e82b9bf93e661fc7e5c4fb
parenta433b3813d8c38b491d2baa7b433973f2d6cd7c6
Repair topology subnet on OpenBSD

Turns out that "topology subnet" never worked totally right on
OpenBSD - the "netmask" parameter to ifconfig is ignored, and one
needs to add a subnet route  (and this issue is hidden if an
encompassing route is pushed, like, by using --redirect-gateway).

While add it, apply the hack used for FreeBSD where "an arbitrary
address from the subnet" is used to set the "remote" end of the
tunnel, and point the route to that - so if OpenBSD decides to
change their kernel routing structure the same way, our code still
works (copying from commit 433b3813d8c38b4, trac #425 and commit
60fd44e501f2002, trac #481).

Tested on OpenBSD 6.0 and 4.9

Trac: #710
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: David Sommerseth <davids@openvpn.net>
Message-Id: <20161109201932.80991-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg12983.html
Signed-off-by: David Sommerseth <davids@openvpn.net>
src/openvpn/tun.c