]> git.ipfire.org Git - thirdparty/openvpn.git/commit
OpenBSD: repair --show-gateway
authorGert Doering <gert@greenie.muc.de>
Mon, 1 Jan 2024 09:40:54 +0000 (10:40 +0100)
committerGert Doering <gert@greenie.muc.de>
Mon, 1 Jan 2024 14:41:52 +0000 (15:41 +0100)
commitacf6f33987c72d9151f68eb618bbaf2d10e61877
tree88439038b1c69f7a79d32ca56060f491973da9e1
parentf13331005d5a75f2788685485d46be1fe2f133a1
OpenBSD: repair --show-gateway

OpenBSD route sockets do not want to be passed RTA_IFP on RTM_GET
- if we do this, we get back EINVAL.

On other platforms, if we do not request RTA_IFP, we will not get
back interface information for queried routes - on OpenBSD, RTA_IFP
comes back always...

So we need to #ifdef this, RTA_IFP on all platforms except OpenBSD.

(Found this fix in OpenBSD's ports tree, in their patches for OpenVPN
2.6.8 - but they just remove RTA_IFP, no #ifdef, so we can't just apply
their patch)

While at it, add M_ERRNO to the "write to routing socket" error message.

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <20240101094054.38869-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg27892.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/route.c