OpenVPN announced that it was sending three addresses in the route socket

messages to lookup the default gateway (RTA_DST | RTA_NETMASK | RTA_IFP),
but did not actually send RTA_IFP. This is caught by the recently added
check in sys/net/rtsock.c r1.284 causing a failure. Remove RTA_IFP from
rtm_addrs to unbreak. Help/ok bluhm@, ok jca@.
This commit is contained in:
sthen 2019-04-05 06:56:00 +00:00
parent 84d925c72e
commit 49adee401a
2 changed files with 24 additions and 4 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.94 2019/02/21 23:41:12 jca Exp $
# $OpenBSD: Makefile,v 1.95 2019/04/05 06:56:00 sthen Exp $
COMMENT= easy-to-use, robust, and highly configurable VPN
DISTNAME= openvpn-2.4.7
REVISION= 0
REVISION= 1
CATEGORIES= net security

View File

@ -1,6 +1,8 @@
$OpenBSD: patch-src_openvpn_route_c,v 1.12 2017/09/29 16:36:23 jca Exp $
$OpenBSD: patch-src_openvpn_route_c,v 1.13 2019/04/05 06:56:00 sthen Exp $
- add support for on-link routes
- #1: add support for on-link routes
- #2, #3: don't advertise an RTA_IFP that is not actually included
Index: src/openvpn/route.c
--- src/openvpn/route.c.orig
@ -26,3 +28,21 @@ Index: src/openvpn/route.c
argv_msg(D_ROUTE, &argv);
status = openvpn_execve_check(&argv, es, 0, "ERROR: OpenBSD/NetBSD route add command failed");
@@ -3603,7 +3608,7 @@ get_default_gateway(struct route_gateway_info *rgi)
/* setup data to send to routing socket */
pid = getpid();
seq = 0;
- rtm_addrs = RTA_DST | RTA_NETMASK | RTA_IFP;
+ rtm_addrs = RTA_DST | RTA_NETMASK;
bzero(&m_rtmsg, sizeof(m_rtmsg));
bzero(&so_dst, sizeof(so_dst));
@@ -3821,7 +3826,7 @@ get_default_gateway_ipv6(struct route_ipv6_gateway_inf
/* setup data to send to routing socket */
pid = getpid();
seq = 0;
- rtm_addrs = RTA_DST | RTA_NETMASK | RTA_IFP;
+ rtm_addrs = RTA_DST | RTA_NETMASK;
bzero(&m_rtmsg, sizeof(m_rtmsg));
bzero(&so_dst, sizeof(so_dst));