diff options
author | Dean Deng <deandeng@google.com> | 2020-08-06 11:01:13 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-08-06 11:03:04 -0700 |
commit | 63447e5afae62dab64940054372166dab45a057c (patch) | |
tree | cf80ec47ebdc3d855647c29c627daa87c7ea871d /pkg/sentry/devices | |
parent | fc4dd3ef455975a033714052b12ebebc85e937d5 (diff) |
Only register /dev/net/tun if supported.
PiperOrigin-RevId: 325266487
Diffstat (limited to 'pkg/sentry/devices')
-rw-r--r-- | pkg/sentry/devices/tundev/tundev.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/devices/tundev/tundev.go b/pkg/sentry/devices/tundev/tundev.go index 852ec3c5c..a40625e19 100644 --- a/pkg/sentry/devices/tundev/tundev.go +++ b/pkg/sentry/devices/tundev/tundev.go @@ -160,8 +160,8 @@ func (fd *tunFD) EventUnregister(e *waiter.Entry) { fd.device.EventUnregister(e) } -// isNetTunSupported returns whether /dev/net/tun device is supported for s. -func isNetTunSupported(s inet.Stack) bool { +// IsNetTunSupported returns whether /dev/net/tun device is supported for s. +func IsNetTunSupported(s inet.Stack) bool { _, ok := s.(*netstack.Stack) return ok } |