]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Merge get_default_gateway() implementation for all 4+1 BSD variants.
authorGert Doering <gert@greenie.muc.de>
Tue, 14 Jan 2014 13:33:18 +0000 (14:33 +0100)
committerGert Doering <gert@greenie.muc.de>
Mon, 26 May 2014 17:54:22 +0000 (19:54 +0200)
commitcab6305be749930eae9c4a1348fb90c4c515d8d7
tree518f08f051b8eadf901e8b38a439af75179e5364
parent0c5632510ce14a25a31b5065019f64ca9724a294
Merge get_default_gateway() implementation for all 4+1 BSD variants.

This was 3 times mostly the same code, with the 4 traditional BSDs
only differing in a single line, while MacOS X had more refined code
to do not only gateway determination, but also netmask, interface name
and MAC address.

The MacOS X code works perfectly well on the other BSDs *if* one macro
is #ifdef'ed to use "(uint32_t)" on MacOS X and "(long)" on all other
BSDs, 32 and 64 bit variants.  API change by OSX when going to 64bit.

Tested on FreeBSD 8.3/i386, FreeBSD 9.1/amd64, NetbSD 5.1/amd64,
OpenBSD 4.9/i386, OpenBSD 5.4/amd64 (= all affected platforms except
DragonFly BSD).

See also trac#42 and trac#340.

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Lazy-Ack-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1389706398-26922-1-git-send-email-gert@greenie.muc.de>
URL: http://article.gmane.org/gmane.network.openvpn.devel/8233
src/openvpn/route.c