Add support for fwmark on linux

This commit is contained in:
Mathias Hall-Andersen
2017-08-22 17:22:45 +02:00
parent c6d03ef17f
commit 4986cfe78b
4 changed files with 44 additions and 12 deletions

View File

@@ -21,9 +21,10 @@ type Device struct {
messageBuffers sync.Pool
}
net struct {
mutex sync.RWMutex
addr *net.UDPAddr // UDP source address
conn *net.UDPConn // UDP "connection"
mutex sync.RWMutex
addr *net.UDPAddr // UDP source address
conn *net.UDPConn // UDP "connection"
fwmark int
}
mutex sync.RWMutex
privateKey NoisePrivateKey