From 6e076e77d82ef78d407fab66b235fe936c02d13a Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Wed, 29 Jan 2014 22:04:23 -0800 Subject: More work on connection reset stuff... --- node/Switch.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'node/Switch.cpp') diff --git a/node/Switch.cpp b/node/Switch.cpp index 77a056c2..9ec15411 100644 --- a/node/Switch.cpp +++ b/node/Switch.cpp @@ -67,10 +67,10 @@ Switch::~Switch() void Switch::onRemotePacket(Demarc::Port localPort,const InetAddress &fromAddr,const Buffer<4096> &data) { try { - if (data.size() > ZT_PROTO_MIN_FRAGMENT_LENGTH) { + if (data.size() >= ZT_PROTO_MIN_FRAGMENT_LENGTH) { if (data[ZT_PACKET_FRAGMENT_IDX_FRAGMENT_INDICATOR] == ZT_PACKET_FRAGMENT_INDICATOR) _handleRemotePacketFragment(localPort,fromAddr,data); - else if (data.size() > ZT_PROTO_MIN_PACKET_LENGTH) + else if (data.size() >= ZT_PROTO_MIN_PACKET_LENGTH) _handleRemotePacketHead(localPort,fromAddr,data); } } catch (std::exception &ex) { -- cgit v1.2.3