1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-09-22 11:19:35 +03:00

Cedar/BridgeUnix: make sure to destroy tap device for bridge on FreeBSD

Also, rename NewTap/FreeTap to NewBridgeTap/FreeBridgeTap because these
functions are used to create/destroy tap device used for bridge
destination.
This commit is contained in:
Koichiro IWAO
2023-06-05 18:29:22 +09:00
parent 696a9bc0a1
commit 09708bc8cb
3 changed files with 36 additions and 14 deletions

View File

@ -506,7 +506,7 @@ ETH *OpenEthLinux(char *name, bool local, bool tapmode, char *tapaddr)
{
#ifndef NO_VLAN
// In tap mode
VLAN *v = NewTap(name, tapaddr, true);
VLAN *v = NewBridgeTap(name, tapaddr, true);
if (v == NULL)
{
return NULL;
@ -1399,7 +1399,7 @@ ETH *OpenEthBSD(char *name, bool local, bool tapmode, char *tapaddr)
{
#ifndef NO_VLAN
// In tap mode
VLAN *v = NewTap(name, tapaddr, true);
VLAN *v = NewBridgeTap(name, tapaddr, true);
if (v == NULL)
{
return NULL;
@ -1475,7 +1475,7 @@ void CloseEth(ETH *e)
if (e->Tap != NULL)
{
#ifndef NO_VLAN
FreeTap(e->Tap);
FreeBridgeTap(e->Tap);
#endif // NO_VLAN
}