mirror of
https://git.zx2c4.com/wireguard-go
synced 2025-10-17 06:00:41 +08:00
Fixed MTU method for linux TUN interface
Updated the TUN interface Added the "MTU" method for the linux implementation of the TUN interface
This commit is contained in:
@@ -4,15 +4,17 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
/* Specification constants */
|
||||
|
||||
const (
|
||||
RekeyAfterMessages = (1 << 64) - (1 << 16) - 1
|
||||
RejectAfterMessages = (1 << 64) - (1 << 4) - 1
|
||||
RekeyAfterTime = time.Second * 120
|
||||
RekeyAttemptTime = time.Second * 90
|
||||
RekeyTimeout = time.Second * 5 // TODO: Exponential backoff
|
||||
RekeyTimeout = time.Second * 5
|
||||
RejectAfterTime = time.Second * 180
|
||||
RejectAfterMessages = (1 << 64) - (1 << 4) - 1
|
||||
KeepaliveTimeout = time.Second * 10
|
||||
CookieRefreshTime = time.Minute * 2
|
||||
CookieRefreshTime = time.Second * 120
|
||||
MaxHandshakeAttemptTime = time.Second * 90
|
||||
)
|
||||
|
||||
@@ -20,11 +22,13 @@ const (
|
||||
RekeyAfterTimeReceiving = RekeyAfterTime - KeepaliveTimeout - RekeyTimeout
|
||||
)
|
||||
|
||||
/* Implementation specific constants */
|
||||
|
||||
const (
|
||||
QueueOutboundSize = 1024
|
||||
QueueInboundSize = 1024
|
||||
QueueHandshakeSize = 1024
|
||||
QueueHandshakeBusySize = QueueHandshakeSize / 8
|
||||
MinMessageSize = MessageTransportSize // keep-alive
|
||||
MaxMessageSize = 4096
|
||||
MaxMessageSize = 4096 // TODO: make depend on the MTU?
|
||||
)
|
||||
|
Reference in New Issue
Block a user