Add a context object in nebula.Main to clean up on error (#550)

This commit is contained in:
brad-defined
2021-11-02 14:14:26 -04:00
committed by GitHub
parent 32cd9a93f1
commit 6ae8ba26f7
13 changed files with 139 additions and 40 deletions

View File

@ -24,6 +24,13 @@ type Tun struct {
*water.Interface
}
func (c *Tun) Close() error {
if c.Interface != nil {
return c.Interface.Close()
}
return nil
}
func newTunFromFd(l *logrus.Logger, deviceFd int, cidr *net.IPNet, defaultMTU int, routes []route, unsafeRoutes []route, txQueueLen int) (ifce *Tun, err error) {
return nil, fmt.Errorf("newTunFromFd not supported in Windows")
}