mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-24 07:16:43 +00:00
Don't overrun MDP MTU
This commit is contained in:
parent
177f695671
commit
ade7428687
@ -120,7 +120,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#define MDP_FORCE 0x0100
|
||||
#define MDP_NOCRYPT 0x0200
|
||||
#define MDP_NOSIGN 0x0400
|
||||
#define MDP_MTU 1200
|
||||
#define MDP_OVERLAY_MTU 1200
|
||||
// worst case packet header overheads for port encoding and crypto envelopes (approx);
|
||||
#define MDP_MTU (MDP_OVERLAY_MTU - 40)
|
||||
|
||||
#define MDP_TX 1
|
||||
#define MDP_BIND 3
|
||||
|
@ -164,7 +164,7 @@ int _overlay_payload_enqueue(struct __sourceloc __whence, struct overlay_frame *
|
||||
if (ob_overrun(p->payload))
|
||||
return WHY("Packet content overrun -- not queueing");
|
||||
|
||||
if (ob_position(p->payload) >= MDP_MTU)
|
||||
if (ob_position(p->payload) >= MDP_OVERLAY_MTU)
|
||||
FATALF("Queued packet len %u is too big", ob_position(p->payload));
|
||||
|
||||
if (queue->length>=queue->maxLength)
|
||||
|
Loading…
Reference in New Issue
Block a user