From 5b98dcf3a36f43bf335f6888d9515bdb614cbd6d Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Sat, 30 Mar 2024 00:34:28 +0100 Subject: Limit ipv6 udp replies to an amount that does not create too large UDP packets. Credits to anonymous donor --- ot_udp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ot_udp.c') diff --git a/ot_udp.c b/ot_udp.c index edbaca8..8309660 100644 --- a/ot_udp.c +++ b/ot_udp.c @@ -141,9 +141,9 @@ int handle_udp6( int64 serversocket, struct ot_workstruct *ws ) { /* We do only want to know, if it is zero */ left = inpacket[64/4] | inpacket[68/4]; - /* Limit amount of peers to 200 */ + /* Limit amount of peers to OT_MAX_PEERS_UDP */ numwant = ntohl( inpacket[92/4] ); - if (numwant > 200) numwant = 200; + if (numwant > OT_MAX_PEERS_UDP) numwant = OT_MAX_PEERS_UDP; event = ntohl( inpacket[80/4] ); port = *(uint16_t*)( ((char*)inpacket) + 96 ); -- cgit v1.2.3