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:
@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user