$OpenBSD: patch-src_openvpn_tun_c,v 1.12 2017/03/28 22:16:37 jca Exp $

- no need for link0 any more, we have separate tap interfaces

--- src/openvpn/tun.c.orig	Wed Mar 22 16:34:21 2017
+++ src/openvpn/tun.c	Mon Mar 27 06:01:57 2017
@@ -1201,7 +1201,7 @@ do_ifconfig(struct tuntap *tt,
         if (tun)
         {
             argv_printf(&argv,
-                        "%s %s %s %s mtu %d netmask 255.255.255.255 up -link0",
+                        "%s %s %s %s mtu %d netmask 255.255.255.255 up",
                         IFCONFIG_PATH,
                         actual,
                         ifconfig_local,
@@ -1213,7 +1213,7 @@ do_ifconfig(struct tuntap *tt,
         {
             remote_end = create_arbitrary_remote( tt );
             argv_printf(&argv,
-                        "%s %s %s %s mtu %d netmask %s up -link0",
+                        "%s %s %s %s mtu %d netmask %s up",
                         IFCONFIG_PATH,
                         actual,
                         ifconfig_local,
@@ -1224,8 +1224,13 @@ do_ifconfig(struct tuntap *tt,
         }
         else
         {
+           /*
+            * OpenBSD has distinct tun and tap devices
+            * so we don't need the "link0" extra parameter to specify we want to do
+            * tunneling at the ethernet level
+            */
             argv_printf(&argv,
-                        "%s %s %s netmask %s mtu %d broadcast %s link0",
+                        "%s %s %s netmask %s mtu %d broadcast %s",
                         IFCONFIG_PATH,
                         actual,
                         ifconfig_local,
