summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7d05601)
Signed-off-by: Sergey Matveev <stargrave@stargrave.org>
+ if prev < govpn.MinPktLength {
+ continue
+ }
i = bytes.Index(buf[:prev], nonceExpectation)
if i == -1 {
continue
i = bytes.Index(buf[:prev], nonceExpectation)
if i == -1 {
continue
+ if prev < govpn.MinPktLength {
+ continue
+ }
i = bytes.Index(buf[:prev], nonceExpectation)
if i == -1 {
continue
i = bytes.Index(buf[:prev], nonceExpectation)
if i == -1 {
continue
PktSizeSize = 2
// Heartbeat rate, relative to Timeout
TimeoutHeartbeat = 4
PktSizeSize = 2
// Heartbeat rate, relative to Timeout
TimeoutHeartbeat = 4
+ // Minimal valid packet length: 2+
+ MinPktLength = 2 + 16 + 8
)
func newNonceCipher(key *[32]byte) *xtea.Cipher {
)
func newNonceCipher(key *[32]byte) *xtea.Cipher {