feat(tun): mention in 'operation not permitted' error the user should specify --device /dev/net/tun

This commit is contained in:
Quentin McGaw
2024-10-28 09:22:08 +00:00
parent 937c667ca8
commit f1f34722ee

View File

@@ -34,6 +34,9 @@ func (t *Tun) Create(path string) (err error) {
fd, err := unix.Open(path, 0, 0)
if err != nil {
if err.Error() == "operation not permitted" {
err = fmt.Errorf("%w (did you specify --device /dev/net/tun to your container command?)", err)
}
return fmt.Errorf("unix opening TUN device file: %w", err)
}