36 lines
1.4 KiB
Text
36 lines
1.4 KiB
Text
- no need for link0 any more, we have separate tap interfaces
|
|
- fix memory leak (gc is unused)
|
|
|
|
Index: src/openvpn/tun.c
|
|
--- src/openvpn/tun.c.orig
|
|
+++ src/openvpn/tun.c
|
|
@@ -1442,21 +1442,26 @@ do_ifconfig_ipv4(struct tuntap *tt, const char *ifname
|
|
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, ifname, ifconfig_local,
|
|
ifconfig_remote_netmask, tun_mtu);
|
|
}
|
|
else if (tt->type == DEV_TYPE_TUN && tt->topology == TOP_SUBNET)
|
|
{
|
|
remote_end = create_arbitrary_remote( tt );
|
|
- argv_printf(&argv, "%s %s %s %s mtu %d netmask %s up -link0",
|
|
+ argv_printf(&argv, "%s %s %s %s mtu %d netmask %s up",
|
|
IFCONFIG_PATH, ifname, ifconfig_local,
|
|
print_in_addr_t(remote_end, 0, &gc), tun_mtu,
|
|
ifconfig_remote_netmask);
|
|
}
|
|
else
|
|
{
|
|
- argv_printf(&argv, "%s %s %s netmask %s mtu %d link0",
|
|
+ /*
|
|
+ * 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",
|
|
IFCONFIG_PATH, ifname, ifconfig_local,
|
|
ifconfig_remote_netmask, tun_mtu);
|
|
}
|