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:
parent
c273078376
commit
86707cbc88
5 changed files with 69 additions and 30 deletions
|
|
@ -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?
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue