TAP interface doesn't work as expected

The flags should be set to TAP instead of TUN, then resolve my issue at  https://github.com/songgao/water/issues/28.
This commit is contained in:
ajee cai 2017-08-31 23:45:14 +08:00 committed by GitHub
parent 6b639456fc
commit 56d7fa05b1

View file

@ -37,7 +37,7 @@ func newTAP(config Config) (ifce *Interface, err error) {
} }
var flags uint16 var flags uint16
flags = cIFF_TUN | cIFF_NO_PI flags = cIFF_TAP | cIFF_NO_PI
if config.PlatformSpecificParams.MultiQueue { if config.PlatformSpecificParams.MultiQueue {
flags |= cIFF_MULTI_QUEUE flags |= cIFF_MULTI_QUEUE
} }