Add netns support
This commit is contained in:
parent
d0d4ebd8db
commit
994d6ccdbf
7 changed files with 220 additions and 80 deletions
12
netns_other.go
Normal file
12
netns_other.go
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
//go:build !linux
|
||||
|
||||
package tun
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net"
|
||||
)
|
||||
|
||||
func listenNetworkNamespace(ctx context.Context, nameOrPath string, config net.ListenConfig, network, address string) (net.Listener, error) {
|
||||
return config.Listen(ctx, network, address)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue