diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-05-25 17:48:45 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-05-25 17:48:45 +0000 |
commit | 357f6b4c6d8044a43a6b1a8416c6a278c18708fa (patch) | |
tree | 53ff152734ca78ed45a38bbc14ae7f99e6cbaddc | |
parent | 4945f72c4aa346abcf1273687a476e2309bcece7 (diff) | |
parent | 3272400a4f21c22a02c95956e860efde45c42f7c (diff) |
Merge release-20210518.0-35-g3272400a4 (automated)
-rw-r--r-- | pkg/abi/linux/ioctl_tun.go | 3 | ||||
-rw-r--r-- | pkg/sentry/socket/netstack/tun.go | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/pkg/abi/linux/ioctl_tun.go b/pkg/abi/linux/ioctl_tun.go index c59c9c136..ea4fdca0f 100644 --- a/pkg/abi/linux/ioctl_tun.go +++ b/pkg/abi/linux/ioctl_tun.go @@ -26,4 +26,7 @@ const ( IFF_TAP = 0x0002 IFF_NO_PI = 0x1000 IFF_NOFILTER = 0x1000 + + // According to linux/if_tun.h "This flag has no real effect" + IFF_ONE_QUEUE = 0x2000 ) diff --git a/pkg/sentry/socket/netstack/tun.go b/pkg/sentry/socket/netstack/tun.go index 288dd0c9e..c7ed52702 100644 --- a/pkg/sentry/socket/netstack/tun.go +++ b/pkg/sentry/socket/netstack/tun.go @@ -40,7 +40,7 @@ func LinuxToTUNFlags(flags uint16) (tun.Flags, error) { // Linux adds IFF_NOFILTER (the same value as IFF_NO_PI unfortunately) // when there is no sk_filter. See __tun_chr_ioctl() in // net/drivers/tun.c. - if flags&^uint16(linux.IFF_TUN|linux.IFF_TAP|linux.IFF_NO_PI) != 0 { + if flags&^uint16(linux.IFF_TUN|linux.IFF_TAP|linux.IFF_NO_PI|linux.IFF_ONE_QUEUE) != 0 { return tun.Flags{}, syserror.EINVAL } return tun.Flags{ |