pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/net/openvpn
Module Name: pkgsrc
Committed By: adam
Date: Sun Jun 24 09:26:12 UTC 2018
Modified Files:
pkgsrc/net/openvpn: Makefile distinfo
Added Files:
pkgsrc/net/openvpn/patches: patch-src_openvpn_tun.c
Log Message:
openvpn: fix for NetBSD with subnet topology; remove empty DIST_SUBDIR
To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 pkgsrc/net/openvpn/Makefile
cvs rdiff -u -r1.41 -r1.42 pkgsrc/net/openvpn/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/net/openvpn/patches/patch-src_openvpn_tun.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/net/openvpn/Makefile
diff -u pkgsrc/net/openvpn/Makefile:1.65 pkgsrc/net/openvpn/Makefile:1.66
--- pkgsrc/net/openvpn/Makefile:1.65 Fri Apr 27 06:40:28 2018
+++ pkgsrc/net/openvpn/Makefile Sun Jun 24 09:26:12 2018
@@ -1,11 +1,10 @@
-# $NetBSD: Makefile,v 1.65 2018/04/27 06:40:28 adam Exp $
+# $NetBSD: Makefile,v 1.66 2018/06/24 09:26:12 adam Exp $
DISTNAME= ${OPENVPN_DISTNAME}
+PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= ${OPENVPN_MASTER_SITES}
EXTRACT_SUFX= .tar.xz
-# Remove DIST_SUBDIR on next update
-DIST_SUBDIR= ${OPENVPN_DIST_SUBDIR}
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
HOMEPAGE= http://openvpn.net/
Index: pkgsrc/net/openvpn/distinfo
diff -u pkgsrc/net/openvpn/distinfo:1.41 pkgsrc/net/openvpn/distinfo:1.42
--- pkgsrc/net/openvpn/distinfo:1.41 Fri Apr 27 06:40:28 2018
+++ pkgsrc/net/openvpn/distinfo Sun Jun 24 09:26:12 2018
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.41 2018/04/27 06:40:28 adam Exp $
+$NetBSD: distinfo,v 1.42 2018/06/24 09:26:12 adam Exp $
SHA1 (openvpn-2.4.6.tar.xz) = 4742492867df31aadc0aeea5c8b4422d1a624e69
RMD160 (openvpn-2.4.6.tar.xz) = 9fb17a39b70d96ecc3075a78011496b239e741d6
@@ -6,3 +6,4 @@ SHA512 (openvpn-2.4.6.tar.xz) = da4301a4
Size (openvpn-2.4.6.tar.xz) = 943376 bytes
SHA1 (patch-configure) = 240342a88baed7642dfd63ed0a2ab4c0a75adbd4
SHA1 (patch-src_compat_compat-basename.c) = 45a58ef2e05f6e0265f229da8540760e60e65143
+SHA1 (patch-src_openvpn_tun.c) = 32b52e0ecd4f8a190bc3c87b49da30e40fb7f241
Added files:
Index: pkgsrc/net/openvpn/patches/patch-src_openvpn_tun.c
diff -u /dev/null pkgsrc/net/openvpn/patches/patch-src_openvpn_tun.c:1.1
--- /dev/null Sun Jun 24 09:26:12 2018
+++ pkgsrc/net/openvpn/patches/patch-src_openvpn_tun.c Sun Jun 24 09:26:12 2018
@@ -0,0 +1,58 @@
+$NetBSD: patch-src_openvpn_tun.c,v 1.1 2018/06/24 09:26:12 adam Exp $
+
+Fix for NetBSD with subnet topology.
+
+--- src/openvpn/tun.c.orig 2018-06-24 07:38:24.000000000 +0000
++++ src/openvpn/tun.c
+@@ -845,7 +845,7 @@ delete_route_connected_v6_net(struct tun
+ #endif /* if defined(_WIN32) || defined(TARGET_DARWIN) || defined(TARGET_NETBSD) || defined(TARGET_OPENBSD) */
+
+ #if defined(TARGET_FREEBSD) || defined(TARGET_DRAGONFLY) \
+- || defined(TARGET_OPENBSD)
++ || defined(TARGET_NETBSD) || defined(TARGET_OPENBSD)
+ /* we can't use true subnet mode on tun on all platforms, as that
+ * conflicts with IPv6 (wants to use ND then, which we don't do),
+ * but the OSes want "a remote address that is different from ours"
+@@ -1269,6 +1269,8 @@ do_ifconfig(struct tuntap *tt,
+
+ #elif defined(TARGET_NETBSD)
+
++ in_addr_t remote_end; /* for "virtual" subnet topology */
++
+ if (tun)
+ {
+ argv_printf(&argv,
+@@ -1282,12 +1284,13 @@ do_ifconfig(struct tuntap *tt,
+ }
+ else if (tt->topology == TOP_SUBNET)
+ {
++ remote_end = create_arbitrary_remote( tt );
+ argv_printf(&argv,
+ "%s %s %s %s mtu %d netmask %s up",
+ IFCONFIG_PATH,
+ actual,
+ ifconfig_local,
+- ifconfig_local,
++ print_in_addr_t(remote_end, 0, &gc),
+ tun_mtu,
+ ifconfig_remote_netmask
+ );
+@@ -1312,6 +1315,18 @@ do_ifconfig(struct tuntap *tt,
+ argv_msg(M_INFO, &argv);
+ openvpn_execve_check(&argv, es, S_FATAL, "NetBSD ifconfig failed");
+
++ /* Add a network route for the local tun interface */
++ if (!tun && tt->topology == TOP_SUBNET)
++ {
++ struct route_ipv4 r;
++ CLEAR(r);
++ r.flags = RT_DEFINED;
++ r.network = tt->local & tt->remote_netmask;
++ r.netmask = tt->remote_netmask;
++ r.gateway = remote_end;
++ add_route(&r, tt, 0, NULL, es);
++ }
++
+ if (do_ipv6)
+ {
+ argv_printf(&argv,
Home |
Main Index |
Thread Index |
Old Index