SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
36
net/openvpn/patches/patch-src_openvpn_tun_c
Normal file
36
net/openvpn/patches/patch-src_openvpn_tun_c
Normal file
|
@ -0,0 +1,36 @@
|
|||
- 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
|
||||
@@ -1376,21 +1376,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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue