mirror of
https://github.com/yggdrasil-network/water.git
synced 2025-05-19 08:25:09 +03:00
Use |=, instead of repeating flags
Signed-off-by: Tony Lu <tonyluj@gmail.com>
This commit is contained in:
parent
c14726aabc
commit
9effada2e6
1 changed files with 2 additions and 2 deletions
|
@ -39,7 +39,7 @@ func newTAP(config Config) (ifce *Interface, err error) {
|
|||
var flags uint16
|
||||
flags = cIFF_TUN | cIFF_NO_PI
|
||||
if config.PlatformSpecificParams.MultiQueue {
|
||||
flags = cIFF_TUN | cIFF_NO_PI | cIFF_MULTI_QUEUE
|
||||
flags |= cIFF_MULTI_QUEUE
|
||||
}
|
||||
name, err := createInterface(file.Fd(), config.Name, flags)
|
||||
if err != nil {
|
||||
|
@ -63,7 +63,7 @@ func newTUN(config Config) (ifce *Interface, err error) {
|
|||
var flags uint16
|
||||
flags = cIFF_TUN | cIFF_NO_PI
|
||||
if config.PlatformSpecificParams.MultiQueue {
|
||||
flags = cIFF_TUN | cIFF_NO_PI | cIFF_MULTI_QUEUE
|
||||
flags |= cIFF_MULTI_QUEUE
|
||||
}
|
||||
name, err := createInterface(file.Fd(), config.Name, flags)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue