mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Allow use of IFF_ONE_QUEUE
Before fix, use of this flag causes an error. It affects applications like OpenVPN which sets this flag for legacy reasons. According to linux/if_tun.h "This flag has no real effect".
This commit is contained in:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user