]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Repair topology subnet on FreeBSD 11
authorGert Doering <gert@greenie.muc.de>
Tue, 8 Nov 2016 12:45:06 +0000 (13:45 +0100)
committerGert Doering <gert@greenie.muc.de>
Wed, 9 Nov 2016 19:37:28 +0000 (20:37 +0100)
commita433b3813d8c38b491d2baa7b433973f2d6cd7c6
treeddc9cd0387cfcf01992a126b40822729a069b241
parentdd9a4f0ecf06e907c57f4fa7ab035b897268d54a
Repair topology subnet on FreeBSD 11

We used to add "route for this subnet" by using our own address as
the gateway address, which used to mean "connected to the interface,
no gateway".  FreeBSD commit 293159 changed the kernel side of that
assumption so "my address" is now always bound to "lo0" - thus, our
subnet route also ended up pointing to "lo0", breaking connectivity
for all hosts in the subnet except the one we used as "remote".

commit 60fd44e501f200 already introduced a "remote address" we use
for the "ifconfig tunX <us> <remote>" part - extend that to be used
as gateway address for the "tunX subnet" as well, and things will
work more robustly.

Tested on FreeBSD 11.0-RELEASE and 7.4-RELEASE (client and server)
(this particular issue is not present before 11.0, but "adding the
subnet route" never worked right, not even in 7.4 - 11.0 just made
the problem manifest more clearly)

Trac #425
URL: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207831

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Steffan Karger <steffan.karger@fox-it.com>
Message-Id: <20161108124506.32559-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg12950.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/tun.c