mirror of
https://github.com/h44z/wg-portal.git
synced 2026-12-05 19:56:06 +01:00
cleanup
This commit is contained in:
@@ -404,6 +404,9 @@ func (c LocalController) deleteLowLevelInterface(id domain.InterfaceIdentifier)
|
||||
return fmt.Errorf("unable to find low level interface: %w", err)
|
||||
}
|
||||
|
||||
if c.importSource == domain.ControllerTypeAmneziaWG && link.Type() != "amneziawg" {
|
||||
return fmt.Errorf("interface %s is not an AmneziaWG kernel device", id)
|
||||
}
|
||||
err = c.nl.LinkDel(link)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to delete low level interface: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user